I am trying to force SSL redirection on a website through IIS 7 (Server 2008) using the following:
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
When I am on the server that IIS is hosted on, this works perfectly. If I try to access the site from any other computer I am met with an error that the website cannot be displayed. Anyone have any tips about this?