Archive for the ‘Leopard’ Category

Leopard and mod_rewrite

Sunday, February 10th, 2008

It seems that there are dozens of websites out there with solutions to getting mod_rewrite to work in Leopard. The solution for me was the second set of instructions on Michael Krol’s blog. His instructions were intended for Tiger, but worked for me nonetheless.

Basically the user config file (/etc/apache2/users/USERNAME.conf) needs to be edited to look similar to this:

<Directory "/Users/USERNAME/Sites/">
    Options All
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

I underlined the parts that are necessary for this to work. Then just restart apache by using the command he provided, or by turning off web sharing and turning it back on right away.

I didn’t need to edit the /etc/apache2/httpd.conf file, although it appears that some people had to, whether out of necessity or because they did both sets of instructions and everything worked, thinking both were necessary. Running 10.5.x, which was freshly installed. Not sure if everything would work on a Mac that was upgraded from Tiger to Leopard.