Code Example - Lowercase URL's

Posted by Community Admin on 03-Aug-2018 09:44

Code Example - Lowercase URL's

All Replies

Posted by Community Admin on 16-May-2011 00:00

Hi all,

I wanted to get lowercase url rewriting working in Sitefinity 4, which with some hunting around and monitoring I have managed to do with the following code snippet. It is using the IIS Url Rewriting module which can be downloaded from www.iis.net/.../urlrewrite.

<rule name="LowerCaseRule" stopProcessing="true">
                    <match url="[A-Z]" ignoreCase="false" />
                    <action type="Redirect" url="ToLower:URL" />
                    <conditions>
                        <add input="URL" pattern="^/Sitefinity" negate="true" />
                        <add input="URL" pattern="^/WebResource" negate="true" />
                        <add input="URL" pattern="^/Telerik" negate="true" />
                        <add input="URL" pattern="^/DefaultWorkflows" negate="true" />
                        <add input="URL" pattern="^/ClientBin" negate="true" />
                        <add input="REQUEST_FILENAME" pattern="^.+\.((axd)|(js)|(jpg)|(gif)|(png)|(css)|(pdf)|(ashx))$" negate="true" />
                    </conditions>
                </rule>

Hope is helps.

higgsy

This thread is closed