1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Code Example - Lowercase URL's

Code Example - Lowercase URL's

1 posts, 0 answered
  1. higgsy
    higgsy avatar
    336 posts
    Registered:
    05 Aug 2010
    16 May 2011
    Link to this post
    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 http://www.iis.net/download/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
1 posts, 0 answered