Tutorial :Redirect all URI to index.php, despite existence


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.


 RewriteCond %{REQUEST_URI} !index\.php   RewriteRule ^(.*)$ index.php/$1 [L,QSA]  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »