https htaccess只排除一个文件夹重定向到https

时间:2014-11-27 14:56:59

标签: .htaccess redirect https

我在我的网站上激活了https,然后我添加了.htaccess

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R=302,L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]

一切正常,但我想在单个文件夹中添加例外,但不能重定向到https。 该文件夹是" public_html / files"

0 个答案:

没有答案