URL Rewrite keeps original host Location when reverse proxy 301 redirects

前端 未结 2 663
悲&欢浪女
悲&欢浪女 2020-12-05 15:14

I have URL Rewrite setup on an IIS 7.5 site: http://site1.com/

This acts as a reverse proxy to the second site: http://site2.com/

Here is the flow of events:

2条回答
  •  臣服心动
    2020-12-05 15:24

    Could Application Request Routing be involved? Look at IIS -> Machine or Site -> Application Request Routing Cache -> Server Proxy Settings and uncheck the "Reverse rewrite host in response headers" checkbox. If you do this at the machine level, it'll take effect for all sites. If you do it on a particular site, it'll only take effect for that site, and other sites on the box will be unaffected.

提交回复
热议问题