I have a domain X which runs at HTTP://www.X.com and would like any HTTPS traffic to that domain (assuming someone enteredHTTPS://www.X.com) to redirect it to
HTTPS://www.Y.com . I want HTTP traffic to pass through normally to http://www.X.com
I have tried this but it does not work:
<rule name="redirect http" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://www.Y.com" redirectType="Found" />
</rule>
I wondered what I am doing wrong