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

URLS in CAPS

7 posts, 0 answered
  1. Mark
    Mark avatar
    24 posts
    Registered:
    16 Jun 2009
    07 Sep 2010
    Link to this post
    This is probably an easy one.

    The developer who set up the sitefinity site I am working on has configured the site to capitalize all of the URL's, is there a setting in within sitefinity that allows me to set all the URL's to lowercase?


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Sep 2010
    Link to this post
    Hello Mark,

    You can do this for pages through the web.config - SiteMap provider


    <siteMap defaultProvider="CmsSiteMapProvider" enabled="true">
        <providers>
            <clear/>
            <add name="CmsSiteMapProvider" lowercaseUrls="true" .....

    You can check if there are any rewrite rules set in IIS or web.config - <urlrewrites> node.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Mark
    Mark avatar
    24 posts
    Registered:
    16 Jun 2009
    07 Sep 2010
    Link to this post

    This hasn't made a difference,  I re-started the IIS service just in case, full snippet below;


    1.<siteMap defaultProvider="CmsSiteMapProvider" enabled="true">
    2.  <providers>
    3.    <clear />
    4.    <add name="CmsSiteMapProvider" description="Displays Cms Pages" type="Telerik.Cms.Web.CmsSiteMapProvider" />
    5.    <add name="CmsSiteMapProvider" lowercaseUrls="true" type="Telerik.Cms.Web.CmsSiteMapProvider" />
    6.  </providers>
    7.</siteMap>
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Sep 2010
    Link to this post
    Hello Mark,

    The you are not talking about pages or there are rewrite rules that overrides this settings

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Mark
    Mark avatar
    24 posts
    Registered:
    16 Jun 2009
    07 Sep 2010
    Link to this post


    The Page name property is set to lower case in most cases, is there anything I can do to force the CMS to pick up this setting (without using URL rewriting) , or is it wholly dependant on the Menu Label property (which is capitalized throughout the site by design)? Sorry just trying to understand why the url's are capitalized in the first place.

    I am I also right in thinking that the config setting you provided will work for all newly created pages?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Sep 2010
    Link to this post
    Hello Mark,

    All controls that uses SiteMapData source should be affected by lowercaseUrls, but this will not be valid if you click "View" from the backend which does not uses CmsSiteMap. For instance if you have RadPanelBar that is bound to SiteMapDataSource control, all urls will be lowered.

    Menu label does not effect the url. The lowercaseUrls works for old and newly create pages.

    Another option is creating standard ASP.NET HttpModule/Handler and get the url as string, then use .ToLower() and make response redirect in BeginRequest from the current context(HttpContext.Current).


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Mark
    Mark avatar
    24 posts
    Registered:
    16 Jun 2009
    07 Sep 2010
    Link to this post


    Thanks for all of this, I also noticed that same URLs deep within the site are actually capitalised within the code, so its a mixed bag. 

    I was think of using  .ToLower() myself but wanted to see if there was something built in.
     
Register for webinar
7 posts, 0 answered