您能否帮助我使用Apache规则排除特定文件名或文件类型?以下是我目前的规则:
RewriteRule ^/(?:blog)/ - [L]
RewriteRule ^crossdomain\.xml$ - [L] (Based on first response)
RewriteRule ^/(.*_css.*\.css.*) /$1 [QSA,L]
RewriteRule ^/(.*_js.*\.js.*) /$1 [QSA,L]
RewriteRule ^/(.*_swf.*\.swf.*) /$1 [QSA,L]
RewriteRule ^/(.*_img.*\.[jpg|JPG|jpeg|JPEG|gif|GIF|bmp|BMP|png|PNG].*) /$1 [QSA,L]
RewriteRule ^/(.*)$ /index.php?url=$1 [QSA,L]
</VirtualHost>
我试图排除我的Flash crossdomain.xml文件被重写。谢谢!
答案 0 :(得分:5)
只需将此规则置于您的首位:
RewriteRule ^/crossdomain\.xml$ - [L]