I have a site where any traffic coming in on port 80 needs to be redirected to port 443 (https). According to this article, that is easy enough and it works. My problem is, however, that this is a load balanced environment. I want to open up a non standard port behind my firewall so that when my sever is off the load balancer I can push my code and test it using http://myip:XXXX via http on the non-standard port without it forcing https.
The rule used in the article is this
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
How can I tweak this so it only redirects for port 80 (or doesn't redirect for my test port)?