Enable Mod_Rewrite on Leopard 10.6.5

November 23rd, 2010
|

I was having a bit of trouble figuring this out. This seemed to do the trick.
(if you don’t have Textmate, use ‘vim’ or ‘pico’ instead of the ‘mate’ commands)

In terminal:

sudo mate /private/etc/apache2/httpd.conf

Find “<Directory />” block. Make sure it looks like this:

Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

Find “LoadModule rewrite_module libexec/apache2/mod_rewrite.so”
Make sure there isn’t a # in front of it. (If libexec/apache2/mod_rewrite.so is different in your httpd.conf, don’t change it to mine. Apparently this differs across different OS X installs.)

Finally, and this was what took me so long to figure out…
Add the following to the first line of your .htaccess file:

Options +FollowSymLinks

or

In my case, I had a conf file written to /etc/apache2/users/ automatically, so when I found it did:

sudo mate /etc/apache2/users/username.conf

This file for me looks like:

username/Sites/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

Note: Remember to change username to your actual username.

Comments are closed.

Comments have been closed for this post. If you would like to ask a question or need help, please post in the forums.