IIS 8.5 URL ReWrite

て烟熏妆下的殇ゞ 提交于 2019-12-13 07:14:06

问题


I have an asp.net application hosted on two servers.

Server 1 : http(s)://server1.domain.com

Server 2 : http://server2.domain.com

Now i have to write URL Rewrite rule so that all the "HTTP" requests coming to server1 should be redirected to server2 but all the "HTTPS" requests coming to server1 should be handled by server1 it self.

Thanks in advance for the help...


回答1:


Try using the following url rewrite rule:

<rule name="Redirect to HTTP" stopProcessing="true">
  <match url="https://*.server1.domain.com/(*)" />
  <action type="Redirect" url="http://server2.domain.com/{R:1}" redirectType="SeeOther" />
</rule>


来源:https://stackoverflow.com/questions/31271012/iis-8-5-url-rewrite

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