Redirect to HTTPS

Coordinator
Dec 23, 2015 at 3:41 PM
Just want to let everyone know if they need to redirect their website from HTTP to HTTPS, this works for me flawlessly. I just need to add this on the Web.Config on the root of my website and install MS URL rewrite module from the link below:

http://www.iis.net/downloads/microsoft/url-rewrite
<configuration>
  <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>
</configuration>
Dec 28, 2015 at 8:52 AM
Thanks for sharing!