Skip to content

Redirect http to https web page on IIS7

Firstly install URL Rewrite from here.

Then open web.config of website you want redirect and add the following rule between the rules tag

<rule name=”HTTP to HTTPS redirect” enabled=”true” 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>