如果REQUEST_URI是特定目录,如何跳过RewriteRule?

时间:2011-10-26 19:53:57

标签: .htaccess mod-rewrite

我想将http连接重写为https,但不是重写rss目录

# redirect to SSL connection
RewriteCond %{SERVER_PORT} 80
# can't get the next line to work
RewriteCond %{REQUEST_URI} !^/(rss)($|/)
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]

谁能告诉我怎么做?

1 个答案:

答案 0 :(得分:2)

这应该有效:

RewriteCond %{REQUEST_URI} !^/rss/