带有重写的 IIS 反向代理无法处理从我们代理到的服务器的重定向 [英] IIS reverse proxy with rewrites can't handle a redirect from the server we proxy to

查看:34
本文介绍了带有重写的 IIS 反向代理无法处理从我们代理到的服务器的重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们拥有服务器 A,有时我们会向服务器 B 上的合作伙伴重写请求.

We own server A, and on some occasions we rewrite requests to our partner on server B.

在某些情况下,服务器 B 将响应重定向到一个完全不同的网站,这是预期的,假设服务器 C.但是,当重定向形式服务器 B 返回服务器 A 时,服务器 A 将其解释为重定向到自身 (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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆