【问题标题】:htaccess redirect https://www.example.net to https://www.example.com/members/htaccess 将 https://www.example.net 重定向到 https://www.example.com/members/
【发布时间】:2017-06-18 10:33:37
【问题描述】:

我的标题说明了一切。我尝试了以下方法,但它仅适用于非 https 版本。

RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^ https://www.example.com/members/ [R=301,L]

【问题讨论】:

    标签: .htaccess ssl https url-rewriting


    【解决方案1】:

    试试下面的规则,

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
    RewriteRule ^ https://www.example.com/members/ [R=301,L]
    

    【讨论】:

    • 那不行,谢谢。我仍然只是收到“您的连接不是私人的”错误。
    • 您的网站是否有 https 证书。
    • 是的。 https 运行良好,谢谢 - 只是不是重写规则。
    猜你喜欢
    • 1970-01-01
    • 2019-12-04
    • 1970-01-01
    • 2015-09-25
    • 1970-01-01
    • 2021-11-13
    • 1970-01-01
    • 2017-10-26
    • 2011-07-06
    相关资源
    最近更新 更多