.htaccess重写规则AND&&

时间:2013-10-15 12:09:06

标签: .htaccess

我想为htaccess做一个重写规则

RewriteRule !packages/paymentmode/(.+?) AND !.*\.(png|gif|jpg|jpeg|js|css|swf)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 

但我不知道如何更改AND,以使此规则更正确。

1 个答案:

答案 0 :(得分:3)

RewriteCond %{REQUEST_URI} !packages/paymentmode/(.+?)
RewriteCond %{REQUEST_URI} !.*\.(png|gif|jpg|jpeg|js|css|swf)$
RewriteRule ^.*$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]