【发布时间】:2012-02-13 02:26:49
【问题描述】:
我希望文件夹 https_folder(包括所有子文件夹和文件)强制使用 https,但每个其他目录或文件都使用 http。
文件夹结构:
- 文件夹
- 文件夹b
- https_文件夹
- 文件夹c
我尝试将其设置为如下,但我似乎无法正常工作
重定向 http /https_folder
RewriteCond %{SERVER_PORT} = 80
RewriteRule ^https_folder/?$ https://%{HTTP_HOST}%/httpd_folder [R=301,QSA,L,NE]
重定向 https 非 /market 页面
RewriteCond %{SERVER_PORT} =443
RewriteCond %{REQUEST_URI} !^/https_folder [NC]
RewriteRule ^/?(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
任何帮助将不胜感激
【问题讨论】:
标签: .htaccess mod-rewrite