Apache not finding index.php by default, set rule for routing through index.php

Posted by eoinoc on Server Fault See other posts from Server Fault or by eoinoc
Published on 2012-04-04T10:40:10Z Indexed on 2012/04/04 11:31 UTC
Read the original article Hit count: 198

Filed under:
|
|

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?

© Server Fault or respective owner

Related posts about apache2

Related posts about .htaccess