【发布时间】:2016-07-28 03:02:33
【问题描述】:
我在.htaccess 中使用此重定向代码来强制所有地址使用https:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://Domain.com%{REQUEST_URI} [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^www.Domain.com [NC]
RewriteRule (.*) https://Domain.com%{REQUEST_URI} [L,R=301,NC]
我想要一个解决方案来强制像 domain.com/example 这样的一个页面只使用 http 而不是强制 https 。 如何修改重定向代码?
非常感谢
【问题讨论】:
标签: .htaccess redirect https url-rewriting