Last active
April 11, 2017 14:25
-
-
Save sitefinitysteve/967ea0bb22f81e1e7f44 to your computer and use it in GitHub Desktop.
This file contains 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="Default Document" stopProcessing="true"> | |
<match url="(.*)" ignoreCase="true" /> | |
<conditions logicalGrouping="MatchAny" trackAllCaptures="false"> | |
<add input="{REQUEST_URI}" pattern="^\/home$" /> | |
<add input="{REQUEST_URI}" pattern="^\/default.aspx$" /> | |
</conditions> | |
<action type="Redirect" url="/" appendQueryString="false" redirectType="Permanent" /> | |
</rule> | |
<rule name="RedirectToWWW" enabled="true" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
<add input="{HTTP_HOST}" pattern="^(?!www)(\S+)\.ca$" /> | |
</conditions> | |
<action type="Redirect" url="https://www.{C:0}/{R:0}" /> | |
</rule> | |
<rule name="LowerCaseRule1" stopProcessing="true"> | |
<match url="(.*)/$" ignoreCase="true" negate="true" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
<add input="{URL}" pattern="[A-Z]" ignoreCase="false" /> | |
<add input="{URL}" pattern="\.axd" negate="true" /> | |
<add input="{URL}" pattern="\.xamlx" negate="true" /> | |
<add input="{URL}" pattern="\.ashx" negate="true" /> | |
<add input="{URL}" pattern="\.asmx" negate="true" /> | |
<add input="{URL}" pattern="\.xap" negate="true" /> | |
<add input="{URL}" pattern="bundles" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="SFRes" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="Res" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="Html5UploadHandler" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="RestApi" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="permalink" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="Sitefinity" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="LoginExternalProvider" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="SystemLibrariesProvider" negate="true" /> | |
<add input="{REQUEST_METHOD}" pattern="POST" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="{ToLower:{URL}}" redirectType="Permanent" /> | |
</rule> | |
<rule name="RemoveTrailingSlashRule1" stopProcessing="true"> | |
<match url="(.*)/$" /> | |
<conditions logicalGrouping="MatchAll" trackAllCaptures="false"> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="(.*?)\.svc$" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="bundles" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="RestApi" negate="true" /> | |
<add input="{REQUEST_FILENAME}" pattern="Sitefinity" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="{R:1}" /> | |
</rule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment