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

Apache on the server is set to find index.php by default, and that works for a normal folder.

However, I have a .htaccess rule to route all requests through my routing script:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]

With these .htaccess contents, the server returns a 404 error. Only by specifying /index.php does the routing script get called.

Any tips on what I am doing wrong?

share|improve this question

1 Answer 1

It sounds like you're not allowing .htaccess files to be used. You need a <Directory> stanza that contains:

AllowOverride All

The option All may not be best for your environment, so take a look at this documentation to see what overrides you will allow in .htaccess.

share|improve this answer

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.