IIS http -> https

Download: http://www.iis.net/downloads/microsoft/url-rewrite

Update web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
 <rewrite>
 <rules>
 <rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
 <match url="(.*)" />
 <conditions logicalGrouping="MatchAny">
 <add input="{SERVER_PORT_SECURE}" pattern="^0$" />
 </conditions>
 <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
 </rule>
 </rules>
 </rewrite>
 </system.webServer>
</configuration>

Leave a Reply

Your email address will not be published. Required fields are marked *