ASPX templates
Version 4.x > ASPX templates > Lowercase URL'S View modes: 
User avatar
Member
Member
emagnier-capprod - 12/9/2009 9:43:14 AM
   
Lowercase URL'S
Hi,

How i can force all URL'S to be lowercase by default in Kentico 4.1 ?

Thanks in advance.
Étienne.

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 12/14/2009 7:16:35 AM
   
RE:Lowercase URL'S
Hello,

There is already another thread discussing this topic. Please take a look at it: http://devnet.kentico.com/Forums.aspx?ForumID=19&Thread=00004982

Best regards
Ondrej Vasil

User avatar
Member
Member
zhaojicheng-hichina - 12/14/2009 9:29:31 PM
   
RE:Lowercase URL'S
if (CMSContext.RawUrl.ToLower() != CMSContext.RawUrl )
{
Response.Redirect(UrlHelper.ResolveUrl(CMSContext.RawUrl.ToLower()));
}

i think this is not a suitable solution.
you'd better to create a "CustomTreeNodeHandler" and change the DocumentUrlPath property.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 12/29/2009 9:50:16 AM
   
RE:Lowercase URL'S
Hi,
DocumentUrlPath property in lowercase doesn't ensure that you won't be able to have a link with URL in uppercase (or undesired case). The mentioned solution in global.asax is suitable, however you're right that it's not a very nice solution.

Although this forum is for 4.x versions, I'd like to point to the new version (5.x) feature where you can specify upper/lowercase behavior of the URLs.
More on this can be found in article about URL format and configuration in our DevGuide.
The new feature is represented by setting "Redirect invalid case URLs to their correct versions".

Regards,
Zdenek C.

User avatar
Member
Member
NicBaddeley - 9/26/2010 9:15:10 PM
   
RE:Lowercase URL'S
Hi Zdenek, the Dev Guide link above throws a 404.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 9/29/2010 9:17:30 PM
   
RE:Lowercase URL'S
Hi Nic,

Thank you for letting us know.
I have corrected the above link and surrounding text to match latest version of the DevGuide.

Regards,
Zdenek