<rewrite> <rules> <rule name="Canonical Host Name" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^domain\.com$" /> </conditions> <action type="Redirect" url="https://www.domain.com{R:1}" redirectType="Permanent" /> </rule> <rule name="Force HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> <add input="{REQUEST_URI}" negate="true" pattern="^(packages|hotelonly)\.php$" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" /> </rule> </rules> </rewrite>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)