Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a OS X 10.6 install working, with Apache and PHP installed.

However, I cannot get mod_rewrite working. The contents of my httpd.conf is located here:

Does anyone know what vital thing I'm missing?

share|improve this question

migrated from Feb 17 '10 at 16:07

This question came from our site for professional and enthusiast programmers.

Can you give us any more information on what is/isn't working? Any error messages in the logs, for example? – Tim Yates Feb 17 '10 at 15:27
Absolutely nothing - I'm getting the index.php, and no evidence that re-writes are even present. – Neil Middleton Feb 17 '10 at 15:28
what is the url you type? what does your hosts file contain? What does your vhost file contain /private/etc/apache2/extra/httpd-vhosts.conf? – Olivier Pons Nov 23 '11 at 21:00

3 Answers 3

up vote 5 down vote accepted

You also need to update /etc/apache2/users/[name].conf where name is your user name on your computer.

If that file doesn't exist, create it. Then update it to allow mod_rewrite rules:

<Directory "/Users/[name]/Sites/">
  Options Indexes MultiViews
  AllowOverride All
  Order allow,deny
  Allow from all
share|improve this answer

Keith Norman's answer is correct. However, in my case - a cusual home server I use for hobbying/testing - I work directly off the "base" directory of the HTTP server, rather than a /~user directory. Consequently, I needed to alter the following line in /private/etc/apache2/httpd.conf:

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
AllowOverride All

Previously it stated:

AllowOverride None
share|improve this answer

You need "RewriteEngine = on" somewhere in your config, but I can't see it anywhere. This turns on RewriteRule, etc.

share|improve this answer
I have this in my .htaccess files – Neil Middleton Feb 18 '10 at 10:27
OK, that's not the problem then. Are you able to show the rewrites that you are trying to do as they aren't in the main config? – Cez Feb 18 '10 at 20:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.