【发布时间】:2015-06-29 09:23:51
【问题描述】:
我有以下域,它只能通过“https:”正确加载
在没有 https 的域上出现以下错误:内部错误:缺少模板 ERR_CONNECT_FAIL
我们将不胜感激任何关于在哪里寻找的提示或可能的方向。尝试了很多不同的东西,目前没有结果
【问题讨论】:
标签: wordpress .htaccess ssl https rewrite
我有以下域,它只能通过“https:”正确加载
在没有 https 的域上出现以下错误:内部错误:缺少模板 ERR_CONNECT_FAIL
我们将不胜感激任何关于在哪里寻找的提示或可能的方向。尝试了很多不同的东西,目前没有结果
【问题讨论】:
标签: wordpress .htaccess ssl https rewrite
试试这个。
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
它只会将用户重定向到 ssl 页面。暂时保存您的网站。
【讨论】: