I'm using a main index.php file to handle the most of requests, so my basic .htacess looks like this one:
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)$ /index.php?page=$1 [L] But i've got some requests (like /signin or /signout) that needs to be handled directly from .php file with the same name (/signin.php and /signout.php).
So my .htaccess rules needs to be: "if %{REQUEST_FILENAME}.php does not exists redirect to /index.php?page=$1 else redirect to %{REQUEST_FILENAME}.php".
How can i do this?