More in this section

Forums / General Discussions / URL Rewrite

URL Rewrite

3 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    18 Feb 2004
    23 Jun 2009
    Link to this post
    Just a simple question (I hope :))

    I want to rewrite some simple urls, to make my website more 'friendly'.

    So I want e.g

    to rewrite as:

    I'm not sure how to do this in SF.

    Also, I'd like that the first URL as described above, is also the one you see if you click the menu items or when you hover the menu items and not the real URL. Is that automatically done, once you set a UrlRewrite rule?


  2. andersleet
    andersleet avatar
    155 posts
    03 Jun 2009
    23 Jun 2009
    Link to this post
    I don't have a "do this, that and the other thing" tutorial for you, but Telerik has some good webinars:

    The fifth webinar is specifically for URL rewriting. I have learned a lot about SF in general watching these so hopefully this will at least get you started!
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    24 Jun 2009
    Link to this post
    Hello andersleet,

    There are several options.

    1. Using AdvancedUrlRewriter. You can declare different rules and patterns in your web.config file.
    2. Use Additional urls - the page will be resolved with the directory you are adding and without it.
    3. For the RadMenu control you can add the following logic  on ItemDataBound event.

          CmsSiteMapNode cmsPage = e.Item.DataItem as CmsSiteMapNode; 
            ICmsPage page = cmsPage as ICmsPage; 
            CmsManager manager = new CmsManager(); 
            IList listofPages = manager.GetPages(); 
            foreach (ICmsPage p in listofPages) 
                IList<RadMenuItem> items = RadMenu1.GetAllItems(); 
                foreach (RadMenuItem item in items) 
                    if (item != null && item.Text.Equals("Rad11")) 
                        ICmsPage mypage = manager.GetPage(p.ID) as ICmsPage; 
                        if (p.Urls.Count > 0) 
                            // this will get the first default url. 
                            e.Item.NavigateUrl = UrlHelper.ResolveUrl(((ICmsUrl)p.Urls[0]).Url); 

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
3 posts, 0 answered