Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a simple .htaccess file to rewrite www.domain.com/foobar.php to www.domain.com/foobar

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

2 Answers 2

up vote 2 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

 
discard

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.