I want to a file which executed at EVERY request, lets say index.php
RewriteRule ^(.*)$ index.php [QSA]
however, if it happens to have index2.php
, lets rather execute that file. In other words, if index2.php
exists, it overrides the default behaviour. So I would write this:
RewriteRule ^(.*)$ index2.php [QSA]
RewriteRule ^(.*)$ index.php [QSA]
but if index2.php
doesnt exists, it fails
RewriteRule ^(.*)$ index2.php [L]
RewriteRule ^(.*)$ index.php [L]
this way too. Index2.php
doesnt need to be exists, but index.php
does and will always be