【问题标题】:Redirect all requests to non www ssl https [closed]将所有请求重定向到非 www ssl https [关闭]
【发布时间】:2014-02-13 07:05:15
【问题描述】:

我需要一个非常简单的 .htaccess 来重定向来自

的所有请求

http://puaction.com

http://www.puaction.com

https://www.puaction.com

https://puaction.com

【问题讨论】:

    标签: php .htaccess redirect ssl https


    【解决方案1】:

    尝试将这些规则添加到文档根目录中的 htaccess 文件中(对于 puaction.com 域):

    RewriteEngine On
    RewriteCond %{HTTPS} off [OR]
    RewriteCond %{HTTP_HOST} ^www\. [NC]
    RewriteRule ^(.*)$ https://puaction.com/$1 [L,R]
    

    【讨论】:

    • 完美!对不起,我不能投票!谢谢!
    【解决方案2】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-30
    • 2015-02-25
    • 1970-01-01
    • 2015-04-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多