【问题标题】:nginx redirect an internal ssl link to an non-ssl external url linknginx 将内部 ssl 链接重定向到非 ssl 外部 url 链接
【发布时间】:2014-06-11 17:31:11
【问题描述】:

我的网站 https example.com 包含指向 http another.com 的链接。如何将外部 url 的任何请求从 https 重定向到 http?

https://example.com -> http://another.com  

问题是外部链接尝试使用https,它需要是http。

【问题讨论】:

    标签: nginx rewrite


    【解决方案1】:

    试试这个。

    server {
       listen 443;
       server_name www.example.com;
       rewrite ^/(.*) http://www.another.com$request_uri permanent;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-25
      • 2012-03-23
      • 2016-04-02
      • 1970-01-01
      • 2016-11-21
      • 1970-01-01
      相关资源
      最近更新 更多