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> ..


<rule name="HTTP to HTTPS redirect" stopProcessing="true">
  <match url="(.*)" />
      <add input="{HTTPS}" pattern="off" ignoreCase="true" />
 <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />

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