I am developing an IFSC code finder script.
I have some files already named about.php
, privacy-policy.php
, contact-us.php
and some other files and folders. My .htaccess
file content is:
RewriteEngine on
RewriteRule ^index.html$ index.php [L]
RewriteRule ^about.html$ about.php [L]
RewriteRule ^privacy-policy.html$ privacy-policy.php [L]
RewriteRule ^contact-us.html$ contact-us.php [L]
RewriteRule ^search.html$ search.php [L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)/?$ index.php?bank=$1&state=$2&district=$3&branch=$4 [QSA]
RewriteRule ^(.*)/(.*)/(.*)/?$ index.php?bank=$1&state=$2&district=$3 [QSA]
RewriteRule ^(.*)/(.*)/?$ index.php?bank=$1&state=$2 [QSA]
RewriteRule ^(.*)/?$ index.php?bank=$1 [QSA]
Now, I want that the files which are already existing like about.html
or about.php
and so on should be shown instead of passing the query to custom rewrite condition. For example when I try to visit http://www.codecyan.com/omi/ifsc/about.html then the about.html file should be shown instead of passing it as http://www.codecyan.com/omi/ifsc/?branch=index.html
Demo website is: http://www.codecyan.com/omi/ifsc/
Thanks :)