views:

18

answers:

1

Hello, I have a main page, index.php and I would like to redirect all URI to index.php despite the existence of the file/directory in the server. Basically, I would like to give priority to index.php over htaccess.

Currently, I have the following:

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

Commenting the first and second line (in the excerpt above) throws an "Internal Server Error" which seems reasonable since that creates a circular logic but I am blind to any other implementations and am basically stuck. I would appreciate it if someone could shed some light.

Thank you.

A: 
 RewriteCond %{REQUEST_URI} !index\.php
 RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Wrikken
Perfect, thank you! :)
a110y