<rule name="Remove www."> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www.(.*)" /> </conditions> <action type="Redirect" url="http://{C:1}/{URL}" /> </rule>
<rule name="Force HTTPS Redirection" enabled="true" stopProcessing="true"> <match url="^$" ignoreCase="false"/> <conditions> <add input="{HTTP_HOST}" pattern="localhost" negate="true" /> <add input="{HTTPS}" pattern="^OFF$"/> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/" redirectType="Permanent"/> </rule> <rule name="Remove www."> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www.(.*)" /> </conditions> <action type="Redirect" url="http://{C:1}/{URL}" /> </rule>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)