【发布时间】:2017-10-30 23:22:56
【问题描述】:
当我尝试使用 .htaccess 创建从 HTTP 页面重定向到 HTTPS 页面(仅针对特定页面)的规则时,我收到了循环重定向。我哪里错了?
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} ^(/doctor) [NC, OR]
RewriteCond %{REQUEST_URI} ^(/client)
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^(/doctor) [NC, OR]
RewriteCond %{REQUEST_URI} !^(/client)
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L]
【问题讨论】:
标签: .htaccess