More in this section
Forums / General Discussions / Hide homepage url

Hide homepage url

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
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:
    12 Sep 2017
    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