ASPX templates
Version 3.x > ASPX templates > Lowercase URL's View modes: 
User avatar
Member
Member
jamescotter-metricon.com - 10/6/2008 10:34:40 PM
   
Lowercase URL's
Hi

Is there anyway to force all URL's to be lowercase by default?

Thanks in advance

James

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 10/7/2008 6:41:05 AM
   
RE:Lowercase URL's
Hi James,

Kentico doesn't support lower case URLs by default. However, you can perform your functionality in ~\App_Code\Global.asax.cs file by modifying Application_BeginRequest method in such a way that you can add for example your redirection functionality code after following section:


case URLRewritingResultEnum.PathRewritten:
{
if (CMSContext.ViewMode == ViewModeEnum.LiveSite)
{


Below you can find example of your custom code:

if (CMSContext.RawUrl.ToLower() != CMSContext.RawUrl )
{
Response.Redirect(UrlHelper.ResolveUrl(CMSContext.RawUrl.ToLower()));
}

Best Regards,
Miroslav Remias