【问题标题】:How to move website from https domain to https domain (301)如何将网站从 https 域移动到 https 域 (301)
【发布时间】:2017-05-27 23:49:48
【问题描述】:

我想将我的一个网站移至新域。所有页面和 URL 结构将保持不变。我为两个域都安装了 ssl 加密证书。

谁能告诉我使用通配符将httphttps 重定向到新域的代码? (新域是https://www。)

【问题讨论】:

  • 这个问题在 SO 中是题外话。请阅读帮助。

标签: .htaccess redirect ssl http-status-code-301


【解决方案1】:

如果有人也需要这个,我自己想出了如何使用 nginx 配置:

    server {
server_name domain.com www.domain.com; 
rewrite ^ $scheme://www.new-domain.com$request_uri permanent;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-03-07
    • 1970-01-01
    • 2015-03-29
    • 2016-07-28
    • 1970-01-01
    • 2021-11-03
    • 2019-09-25
    • 1970-01-01
    相关资源
    最近更新 更多