【发布时间】:2014-06-11 17:31:11
【问题描述】:
我的网站 https example.com 包含指向 http another.com 的链接。如何将外部 url 的任何请求从 https 重定向到 http?
https://example.com -> http://another.com
问题是外部链接尝试使用https,它需要是http。
【问题讨论】:
我的网站 https example.com 包含指向 http another.com 的链接。如何将外部 url 的任何请求从 https 重定向到 http?
https://example.com -> http://another.com
问题是外部链接尝试使用https,它需要是http。
【问题讨论】:
试试这个。
server {
listen 443;
server_name www.example.com;
rewrite ^/(.*) http://www.another.com$request_uri permanent;
}
【讨论】: