Allow ModRewrite in Mac OS X

ModRewrite is described on the Apache page as the “Swiss Army Knife of URL manipulation”. So you can imagine my upset when it wasn’t working on my Mac. Luckily, all I had to do was a small config change to enable it.

To fix this I had to edit:

/private/etc/apache2/httpd.conf

and change it to allow override by .htaccess files.

Find the directory at around line number 194 – /Library/WebServer/Documents . Then change to:

AllowOverride All

You’ll need to restart apache which you can do via System Preferences -> Sharing -> Web Sharing then uncheck and recheck it. I prefer the old fashioned way:

sudo apachectl graceful

Note that if you are trying to get this to work on your apache local to your user area then you will also need to change that config.

P.s. There is also a quote from Brian Moore on the Apache page which describes ModRewrite as “voodoo”, so beware!

Share/Bookmark

Posted by Tom.

About Tom: Magento Loving Managing Director at Meanbee. Main tasks include coding magento themes, drinking tea and reminding Nick what he should be doing.

View the original version of this post.

Leave a Reply

  • You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tweets from @meanbee

Contact Meanbee

Send us your message