0
votes

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

1 Answers

0
votes

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>