Apache / Server Tutorials
Fix WordPress CRONs on Media Temple (dv) Servers
When I switched from Dreamhost shared hosting to Media Temple (dv) server hosting, I had a hell of a time trying to figure out why CRONs weren't working correctly on the website. I had database backups being sent via CRON jobs so making sure CRONs were working was imperative. What's great is that the way to make these Wordpress CRONs work was by...setting up a CRON.
Fixing mod_rewrite and .htaccess on GoDaddy Hosting
I recently launched a new website on GoDaddy shared hosting. The website required mod_rewrite for SEO-friendly URLs. GoDaddy provides mod_rewrite but every time I tried to hit a two-deep URL, I would get a 404 error. Here's what I had:
Use FURL to Retrieve Website Headers
It's important to know what headers your website and its files are communicating. For example, if your website is providing a 404 status, you're probably streaking toward your computer to fix the problem. Using the FURL library, you may retrieve website headers from the command line.
XAMPP Lite, Windows Vista, and php5apache2_2.dll
I recently ran into a nightmare when needing to use my father's laptop for development. My XAMMP Lite USB install, which worked perfectly on my Windows XP desktop, was giving the following error when trying to start Apache:
Set php.ini Values Using .htaccess
Did you know that you can set php.ini values right inside the .htaccess file? It's actually very easy.
Increase PHP’s File Upload Limit Using php.ini
The file upload size limit is usually set pretty low by shared hosting providers. Why? To save bandwidth, keep the server moving quickly, and think about it — how many customers really need a large upload limit? If you do need to increase the maximum upload limit, all you need to do is place the following code snippet in your php.ini file:
Advanced .htaccess Security – Allow or Block Specific IPs From Your Website
The more I use the .htaccess file the more I appreciate its value. My next valuable lesson in .htaccess security deals with allowing and blocking access to a web server from a specific IP address. Reasons for doing this include:
Advanced .htaccess Security – Block Unwanted Referrers
For some bloggers and web developers, Digg can be a huge boost in traffic and thus a huge bust in ad revenue. Unfortunately, the Digg Effect can kill a website's bandwidth and get the website shut down. Wouldn't it be great if a weary web developer could prevent his site from being shut down by blocking users referred by Digg, at least a while? Using a small bit of .htaccess code and mod_rewrite, the developer can do just that.
Advanced Branding – Give Your Pages A Custom Extension Using .htaccess SetHandler
A sign of a good website is one that does the "little things" to increase the usability or value to the user. There are other little things you can do to enhance your website, including giving your pages a custom extension.
Hide Your .htaccess Settings Using … .htaccess
Your .htaccess file can hold a good amount of information about the structure of your website, some of which should not be exposed to users. These settings include mod_rewrite settings, php_flag/php_value settings, and SetHandler directives.