开发者

.htaccess condition - action dependent on filetype

开发者 https://www.devze.com 2023-02-02 13:29 出处:网络
What I have is a rule: RewriteCond %{REQUEST_FILENAME}.php !abc.php RewriteRule ^(.*)$ some.php [L] 开发者_JAVA技巧

What I have is a rule:

RewriteCond %{REQUEST_FILENAME}.php !abc.php  
RewriteRule ^(.*)$ some.php [L]
开发者_JAVA技巧

what's necessary to add condition where .html filetype will also run under that rule?


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]
0

精彩评论

暂无评论...
验证码 换一张
取 消