Enabling .htaccess On Mac OS X

I do a lot of web development on my laptop. I’ve got Apache and PHP there, so it’s really convenient, but I usually move projects off to other server before I get around to wanting to mess with mod_rewrite. Not so, recently, but I ran into a big stumbling block when I discovered OS X’s Apache comes pre-configured to ignore .htaccess files.

A couple points. First, Apache’s own mod_rewrite docs include the following quote:

Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo.

So I’m not going to feel too bad about scratching my head for a minute before realizing I should check to make sure the httpd.conf file had support for .htaccess files enabled, but the second point, and I know this thanks to Richard Rutter’s Clagnut, support must also be enabled in the user’s http.conf file (located in /private/etc/httpd/users/). For full details, go read Rutter’s enabling .htaccess in OS X post.

tags: , , , , , , , , , , ,

3 Comments

  1. Comment by Jim on March 15, 2006 1:23 pm

    thank you!
    I’ve been looking everywhere and didn’t know I had to edit that damn private/etc/user file ack!
    now it works :)

  2. Comment by shaffick on July 7, 2006 8:25 pm

    THANK YOU SO MUCH!!!

    I’ve been struggling with this for a while now

  3. Comment by Paco on August 17, 2008 6:09 pm

    Hy! I saw a blog where they explained how to activate htaccess on leopard. Here http://www.fernandoalou.com/blog/archivo/2008/08/09/1/como-activar-httaccess-en-apache-de-leopard-osx-10.5/

Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

1