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

Forums / General Discussions / Hide homepage url

Hide homepage url

3 posts, 1 answered
  1. Daniel Lang
    Daniel Lang avatar
    8 posts
    Registered:
    26 Nov 2009
    06 Apr 2011
    Link to this post
    Dear all!

    I would like to force Sitefinity 3.7 not to redirect to the homepage-url.
    At the moment users visiting www.flexbit.at will be 301-redirected to www.flexbit.at/aktuelles which is the url of the homepage.

    I am aware of the property "redirectToHomepage" in the cms-provider and this works fine when I set it to false, but then the main-navigation item "Aktuelles" (= the homepage) is not higlighted anymore and also produces duplicate-content (both www.flexbit.at AND www.flexbit.at/aktuelles will show the same page). I could, of course add an external link into the main-menu which has its link set to "/" but then the item will still not be highlighted in the menu...

    Any tips are appreciated - thank you!
    Daniel Lang
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Apr 2011
    Link to this post
    Hello Daniel,

    You can modify the built-in SiteTabStrip control and check whether the request points only to the domain name(host - http://www.flexbit.at/).If this is the case you can get the home page of the website and from there you can mark the proper RadTab. You can do this inside SiteTabStrip - Page_Load.


                    var homepage = UrlHelper.HomePage;
                    var homeUrl = homepage.Url;

                    RadTab item1 = this.RadTabstrip1.FindTabByUrl(this.ResolveUrl(homeUrl));
                    if (item1 != null)
                    {
                        item1.Selected = true;
                    }

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Answered
  3. Daniel Lang
    Daniel Lang avatar
    8 posts
    Registered:
    26 Nov 2009
    06 Apr 2011
    Link to this post
    Hi Ivan!

    Thank you for this useful tip - I'm sure I will get it done this way!
    I'm really impressed of you guys doing such a great job. There should be a "like" - button on forum-posts...

    Regards,
    Daniel Lang
Register for webinar
3 posts, 1 answered