htaccess的条件 - 行动依赖于文件类型 [英] .htaccess condition - action dependent on filetype
本文介绍了htaccess的条件 - 行动依赖于文件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有个规则:
RewriteCond %{REQUEST_FILENAME}.php !abc.php
RewriteRule ^(.*)$ some.php [L]
什么是必要的补充条件,其中的.html文件类型也将根据该规则运行?
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]
这篇关于htaccess的条件 - 行动依赖于文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文