.htaccess Archives

OSX 10.6 Snow Leopard comes bundled with Apache 2 and decent build of PHP 5, but .htaccess files won’t work by default. If you aren’t familiar with Apache, .htaccess files are a pretty cool way to customize or overwrite settings on a per directory basis. Things I’ve used .htaccess for include mod_rewrite rules (for pretty URLs), increasing the PHP upload filesize, and pointing log files to a custom destination.

There is a pretty simple change you can make to enable the use of .htaccess files. We’ll be using the command line for this one, but you should already love the terminal right? Fire up your terminal program of choice and type in this command:

cd /etc/apache2/users

Continue Reading