Last active
June 14, 2019 11:35
-
-
Save tamys/7b15ceaac2d191038ae17a51d90ae3df to your computer and use it in GitHub Desktop.
Redirect all non https to https and all non www to www
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <rule name="Force WWW and SSL" enabled="true" stopProcessing="true"> | |
| <match url="(.*)" /> | |
| <conditions logicalGrouping="MatchAny"> | |
| <add input="{HTTP_HOST}" pattern="^[^www]" /> | |
| <add input="{HTTPS}" pattern="off" /> | |
| </conditions> | |
| <action type="Redirect" url="https://www.zzz.com/{R:1}" appendQueryString="true" redirectType="Permanent" /> | |
| </rule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <rule name="Force WWW and SSL" enabled="true" stopProcessing="true"> | |
| <match url="(.*)" /> | |
| <conditions logicalGrouping="MatchAny"> | |
| <add input="{HTTP_HOST}" pattern="^[^www]" /> | |
| <add input="{HTTPS}" pattern="off" /> | |
| </conditions> | |
| <action type="Redirect" url="https://www.zzz.com/{R:1}" appendQueryString="true" redirectType="Permanent" /> | |
| </rule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment