force all urls to https in IIS

Here explains how to force all url requests to https in IIS 7. There are several ways to do this and this is the easiest way if you have access to file manager to edit the web.config files. Just add the following lines in web.config inside the <system.webserver> ..

</system.webserver>


<system.webserver>
<rewrite>
<rules>
<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>
</rules>
</rewrite>
<system.webserver>
<system.webserver>

Hope it work for you. Just drop comments if you have any thing to say… 🙂