david winter

mod_rewrite and Mac OS X Personal Web Sharing

It was very frustrating installing a fresh Wordpress on my Mac and finding that the permalinks didn’t work. Turns out the default Apache settings for personal web sharing on OS X disable .htaccess overriding.

sudo mate /etc/httpd/users/yourusername.conf

Now you’ll want to enable Apache to follow symbolic links:

Options Indexes MultiViews FollowSymLinks

And to allow .htaccess overriding:

AllowOverride All

The file should then look like:

<Directory "/Users/yourusername/Sites/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

Now in System Preferences, stop and start ‘Personal Web Sharing’. Things should work perfectly now.

May 20, 2007

Questions? Comments? Your 2¢'s? → @davidwinter