IIS AAR - URL Rewrite for reverse proxy - how to send HTTP_HOST

点点圈 提交于 2019-11-30 04:31:58
Ryan

This post has the answer - Modifying headers with IIS7 Application Request Routing

Need to enable preserveHostHeader - can't see how you do that in the UI but this works

Run this from command line to update Machine/webroot/apphost config

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/proxy -preserveHostHeader:true /commit:apphost

My guess would be that your server doesn't allow you to change the server variable HTTP_HOST when you rewrite the URL.

At the level of the website where the URL rewrite is applied:

Then click the Add... link on the right tab and add your HTTP_HOST variable:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!