我的想法是访问 abc.com 会强制跳转到 https://abc.com,再通过 https://abc.com 跳转到 zxy.com
主要不想让 zxy 的服务器知道这个 ip 是从 abc.com 跳转过来的~~
|  |      1ryd994      2016-06-25 00:47:20 +08:00 via Android  1 就一个 https 的 server 然后 return 301 http://zxy.com 就行 301 或者 302 Nginx 里除了 listen 加 ssl , http 和 https 服务器没有区别 | 
|      2jsjcjsjc OP @ryd994 server 这样写可以吗? { listen 80; server_name g.getpocket.net; location / { rewrite ^/(.*)$ https://g.getpocket.net$1 permanent; } } server { server_name g.getpocket.net; listen 443; ssl on; ssl_certificate /etc/letsencrypt/live/g.getpocket.net/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/g.getpocket.net/privkey.pem; location / { rewrite ^/(.*)$ http://baidu.com$1 permanent; } } | 
|      3TaMud      2016-06-25 09:53:27 +08:00 nginx proxy host | 
|  |      5lslqtz      2016-06-25 10:09:10 +08:00 via iPhone listen 80 下我习惯用 return 301 。 | 
|  |      6lslqtz      2016-06-25 10:09:46 +08:00 via iPhone 不想知道就用 js 吧 否则会有 referer | 
|  |      7caola      2016-06-25 10:54:26 +08:00 https 可以参考我回复的 https://www.v2ex.com/t/286552#r_3285670 来配置,跳转的话,建议使用  return 301 方式就可以了 | 
|  |      8HLT      2016-06-25 13:34:12 +08:00 特别想知道这到底是个什么需求。。。 | 
|  |      9raphaelsoul      2016-06-25 16:17:30 +08:00 server { listen 80; charset utf-8; server_name domain.com www.domain.com; access_log off; rewrite ^(.*) https://$server_name$request_uri permanent; } server { listen 443 ; ssl on; ..... } | 
|      10jsjcjsjc OP @raphaelsoul 你这个是和我 2 楼写的是一个意思吗?没看出来不一样啊 ;-) | 
|      11jsjcjsjc OP @HLT 我有个域名有很多自然流量,但是已经被 google 列入黑名单了,所以需要跳转但又不能让 google 知道 refer~~ | 
|      12jsjcjsjc OP @lslqtz 你的意思是只有 return 301 或者 js 的跳转才不会留下 refer 吗?可以根据 2 楼我的回复给我一个例子吗。。没明白啊~~~非常感谢 ;-) | 
|  |      14lslqtz2      2016-06-25 17:27:05 +08:00 root 到一个页面,在那个页面写上 script 就可以了。 百度的 https 跳转 http (在爬虫情况下)是用 js ,如果不支持 js 用 meta ,可以参考。 js 是不会附带 referer 的。 | 
|      16jsjcjsjc OP @lslqtz2 我看了 wiki ,上面说 https 的跳转也不会有 referer “ If a website is accessed from a HTTP Secure (HTTPS) connection and a link points to anywhere except another secure location, then the referrer field is not sent.[10]” https://en.wikipedia.org/wiki/HTTP_referer#Referrer_hiding | 
|  |      17mhtt      2016-06-26 09:46:56 +08:00 via iPhone 80 为什么不直接跳你需要跳的,还要走一道 433 ? | 
|  |      18mhtt      2016-06-26 09:47:19 +08:00 via iPhone 443 |