【发布时间】:2018-09-08 03:47:51
【问题描述】:
我想将我所有的网站 URL(带有 www)从 https 重定向到 http
现在使用下面的代码,它只适用于https://www.example.it 到http://www.example.it(以及所有其他页面,例如:example.com/page02.php)
但从https://example.com 到http://example.com 不起作用(ERR_CONNECTION_REFUSED)
这是我的代码:
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^example.com [OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
有人知道我该怎么做吗?
【问题讨论】:
-
你说,我想将我所有的网站 URL(带 www)从 https 重定向到 http ,然后你说从 example.com 到 example.com 不起作用所以,你想要什么确切地 ?是否要将所有 https 强制转换为 http ?
-
是的,我希望所有使用 HTTPS 的页面都重定向到 HTTP。
-
您的
www子域是否有有效的ssl 证书? -
我没有 ssl 证书,所以我想将 https 重定向到 http