.htaccess 如果请求URI是特定目录,如何跳过重写规则?

.htaccess 如果请求URI是特定目录,如何跳过重写规则?,.htaccess,mod-rewrite,.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] 有人能告诉我怎么做吗?这应该可以: RewriteCond %{REQ

我想将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]
有人能告诉我怎么做吗?

这应该可以:

RewriteCond %{REQUEST_URI} !^/rss/

是的,我同意这应该行得通。但对我来说,它不是我将创建另一个更详细的问题。@clark-hmm,真奇怪!会发生什么?你被重定向了吗?你能举个例子吗?