規則一:
屏蔽非php擴展的動態文件,例如asp、aspx等,可以阻止asp、aspx等后綴的后門程序運行
RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php
規則二:
屏蔽站點file目錄php運行權限,站點的file目錄默認具有寫入權限,當網站出現未知漏洞時,可能會被寫入后門程序,阻止php運行之后,即使有后門程序也將無法運行。
RewriteRule ^(.*)/file/(.*)\.php(.*)$ /404.php
3.0及以下版本需要再加一條
RewriteRule ^(.*)/cache/(.*)\.php(.*)$ /404.php
最新的偽靜態規則已經更新,請參考:http://www.scxaqlg.cn/doc/skill/10.html