Enabling Mod_Rewrite on OS X 10.6.8

Article published Tuesday, December 27th, 2011 at 12:00 pm

Here’s a really quick guide I started months ago and then forgot all about it. I’ll forego the formalities and just show you the quick version.

Edit this file:

/etc/apache2/httpd.conf

Search for AllowOverride, and set it to All (change it from being None). There are about two instances of this. This allows Apache to read .htaccess files.

Edit this file:

/etc/apache2/users/username.conf

Look for this code and make the appropriate changes. It assumes you’re serving files from your user directory:

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

Hi, I’m Tom, and Renowned Media is my professional blog for web development tutorials. Traditionally, I’m a PHP/MySQL developer, but recently I’ve done a lot of JavaScript and Backbone.js development. Right now I’m really interested in Node.js and NoSQL technologies. I love developing on a mac and deploying apps to Linux servers.

Facebook Twitter LinkedIn Google+ 

Tags: , ,

Category: OS X TutorialsServer/Apache/lighttpd Tutorials

Leave a Reply