带有重写的IIS反向代理无法处理来自我们代理的服务器的重定向 [英] IIS reverse proxy with rewrites can't handle a redirect from the server we proxy to
问题描述
我们拥有服务器A,在某些情况下,我们会在服务器B上向我们的合作伙伴重写请求。
We own server A, and on some occasions we rewrite requests to our partner on server B.
在某些情况下,服务器B将通过重定向完全响应不同的网站,这是预期的,假设服务器C.然而,当重定向表单服务器B返回到服务器A时,服务器A将其解释为重定向到iteself(A)上的位置而不是重定向到其他网站 - 服务器C.
In some cases server B will respond with a redirect to a completely different website, which is what is expected, let's say server C. However, when that redirect form server B comes back to server A, server A interprets it as a redirect to a location on iteself (A) and not as a redirect to other website - server C.
如何记录重定向到外部网站并实际去那里,而不是假设重定向在我的服务器上(和404ing) ?我们正在使用重写模块运行IIS 7.
How do I take note of the redirect to the external website and actually go there, rather than assuming that redirect is on my server (and 404ing)? We're running IIS 7 with the rewrite module.
任何帮助都非常感谢。
推荐答案
转到ARR代理设置(它们隐藏在IIS - >应用程序请求路由缓存 - >服务器代理设置下)并取消选中在响应标头中反向重写主机复选框。这应该足够了。
Go to the ARR proxy settings (they're hidden under IIS -> Application Request Routing Cache -> Server Proxy Settings) and uncheck the "Reverse rewrite host in response headers" checkbox. That should be enough.
这篇关于带有重写的IIS反向代理无法处理来自我们代理的服务器的重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!