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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple .htaccess file to rewrite to

RewriteEngine On
RewriteRule foobar foobar.php [L]

It is giving me a 404 even though I ran phpinfo(); (which shows the mod_rewrite module), and checked httpd.conf (which uses mod_rewrite several times by default).

Any suggestions?

share|improve this question
up vote 3 down vote accepted

The most possible reason for this is that you haven't set 'AllowOverride' to at least 'FileInfo' at your configuration.

share|improve this answer
Thank you for your answer. I set it to AllowOverride All and it worked – Matthew2468 Dec 31 '12 at 15:37

Check your rewrite log by adding these directives :

RewriteLogLevel 3
RewriteLog /path/to/logfile
share|improve this answer
Thank you for the help – Matthew2468 Dec 31 '12 at 15:37

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.