Skip to content Skip to sidebar Skip to footer

.htaccess Condition - Action Dependent On Filetype

What I have is a rule: RewriteCond %{REQUEST_FILENAME}.php !abc.php RewriteRule ^(.*)$ some.php [L] what's necessary to add condition where .html filetype will also run under th

Solution 1:

It's late so I may be wrong, but this should do the trick:

RewriteCond %{REQUEST_FILENAME} !abc\.php 
RewriteCond %{REQUEST_FILENAME} ^(.*\.html)$  
RewriteRule ^(.*)$ some.php [L]

Post a Comment for ".htaccess Condition - Action Dependent On Filetype"