【发布时间】:2016-12-07 17:29:17
【问题描述】:
我需要先将特定的 http URL 重定向到其等效的 https,然后再重定向到完全不同的 https URL(不要问为什么我不能直接将原始 http 重定向到最终的 https URL,这就是客户想要,客户永远是对的!)。此外,我还需要能够将原始 https 重定向到不同的 https。
所以,我需要的是能够重定向http://foo.bar.com => https://foo.bar.com 然后https://foo.bar.com => https://another.foobar.com,以及重定向https://foo.bar.com => https://another.foobar.com。
目前只重定向https://foo.bar.com => https://another.foobar.com 我正在使用这个:
acl is_new_portal hdr(host) -i foo.bar.com
redirect location https://another.foobar.com code 302 if is_new_portal
在端口 443 上进行初始绑定,我知道将 http 重定向到我会使用的 https:
redirect scheme https code 302 if !{ ssl_fc }
(使用代码 302 而不是 301,因为最终 another.foobar.com 将被删除,所以我不希望重定向永久缓存在客户端的浏览器中)
但我需要能够同时进行这两种重定位,我不确定您如何将两者结合起来?
【问题讨论】: