I am trying to setup https redirects to same site having different bindings. i.e Site1 = www.domain1.com Site2 = www.domain2.com Site3 = www.domain3.com
I am using the following redirect rules but they only work for first site and not working for other 2 sites
<rewrite>
<rules>
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="http://domain1.com" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://domain1.com" redirectType="Permanent" />
</rule>
<rule name="HTTP Redirect to HTTPS 2" enabled="true" stopProcessing="true">
<match url="http://domain2.com" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://domain2.com" redirectType="Permanent" />
</rule>
Please guide what I am missing here. As http://domain1.com redirects to https://domain1.com but domain2 is not working.