Last active
January 13, 2021 04:59
-
-
Save klpatil/8cb62e17d8ea918cd71680a2b25a155c to your computer and use it in GitHub Desktop.
SXA Lower case URL
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
<?xml version="1.0"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<linkManager> | |
<providers> | |
<add name="localizedProvider"> | |
<patch:attribute name="lowercaseUrls">true</patch:attribute> | |
</add> | |
</providers> | |
</linkManager> | |
<links> | |
<urlBuilder> | |
<lowercaseUrls>true</lowercaseUrls> | |
</urlBuilder> | |
</links> | |
</sitecore> | |
</configuration> |
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
<rules> | |
<!-- Take redirectType="Temporary" out of production if needed - Current live site has same configuration --> | |
<rule name="LowerCaseRule - not including querystring" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{PATH_INFO}" pattern=".*[A-Z]" ignoreCase="false" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="^/(sitecore)" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="^/(sitecore modules)" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="^/-/" negate="true" /> | |
<add input="{REQUEST_URI}" pattern=".*(-/media).*" negate="true" /> | |
<add input="{REQUEST_URI}" pattern=".*(~/media).*" negate="true" /> | |
<add input="{REQUEST_URI}" pattern=".*(~/icon).*" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="WebResource.axd" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="ScriptResource.axd" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="jsnlog.logger" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="Telerik.Web.UI.WebResource.axd" negate="true" /> | |
<add input="{REQUEST_METHOD}" matchType="Pattern" pattern="POST" ignoreCase="true" negate="true" /> | |
<add input="{REQUEST_URI}" pattern="^/(identity)" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="/{ToLower:{R:1}}" appendQueryString="true" redirectType="Temporary" /> | |
</rule> | |
</rules> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment