【问题标题】:Domain only works as https (wordpress)域仅用作 https (wordpress)
【发布时间】:2015-06-29 09:23:51
【问题描述】:

我有以下域,它只能通过“https:”正确加载

在没有 https 的域上出现以下错误:内部错误:缺少模板 ERR_CONNECT_FAIL

我们将不胜感激任何关于在哪里寻找的提示或可能的方向。尝试了很多不同的东西,目前没有结果

【问题讨论】:

    标签: wordpress .htaccess ssl https rewrite


    【解决方案1】:

    试试这个。

         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 页面。暂时保存您的网站。

    【讨论】:

      猜你喜欢
      • 2016-11-12
      • 2022-01-05
      • 2020-11-03
      • 1970-01-01
      • 1970-01-01
      • 2021-05-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多