如何从以下重写规则中排除特定文件类型(xml和txt)?
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://website.com/$1/ [QSA,L,R=301]
答案 0 :(得分:13)
怎么样:
RewriteCond %{REQUEST_URI} !\.(xml|txt)$