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

Forums / General Discussions / 301 Redirect

301 Redirect

7 posts, 0 answered
  1. Andy
    Andy avatar
    2 posts
    Registered:
    23 Jan 2012
    24 Jan 2012
    Link to this post
    Just wondering about the most effective way to execute a 301 redirect using the Sitefinity platform?

    We have a new website going live and we require to permanent redirect around 79 pages of old content to their corresponding new pages.
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    24 Jan 2012
    Link to this post
    Dear Andy
    If the old pages were .aspx as well, what would happen if you add the old url as an extra url to the new page?
    Markus
  3. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    05 Dec 2016
    26 Jan 2012
    Link to this post
    Hello,

     Redirect can be called by assigning additional urls to pages. To do so go to a page, expand Actions menu and then select Title & Properties. Enter additional urls for this page by ckecking Allow Additional Url checkbox. Note you can`t have additional url same as the page url.

    Onother way is to use this redirect widget I have attached. You can change the status code in its code behind.
    To register the widget refer to this documentation.

    Kind regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Andy
    Andy avatar
    2 posts
    Registered:
    23 Jan 2012
    02 Feb 2012
    Link to this post
    Hi Stanislav,

    Many thanks for the reply.

    Will assigning numerous URL's to a single page still be a 301 permanent redirect?

    Andy
  5. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    05 Dec 2016
    06 Feb 2012
    Link to this post
    Hello,

     Yes they will all be 301. In the control I attached I specify the status code.

    if (!HttpContext.Current.Request.Url.ToString().Contains("/Action/Edit"))
                {
                    Response.StatusCode = 301;
                    Response.AddHeader("Location", RedirectString);
                }
    This can be changed to other codes to suit your purpose, however if the page redirects to many pages I am not sure how this can be achieved since the request will redirect to a page and then on the other page if you have redirect control a new redirect will be possible.All the best,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Vincent
    Vincent avatar
    1 posts
    Registered:
    29 May 2013
    29 May 2013 in reply to Stanislav Velikov
    Link to this post
    Hi Stanislav,

    I do not really understand what you are saying. So I have a page/url that I want to delete. I want a redirection of that url to avoid the 404. So what I do is delete the page (url) then add that url to the page I want it to forward (301) to?

    and I can undo that be reversing that proces? Delete the url assigned to page, add the page, set the url?

    ps the link to the documentation gives a 404 :o) 

    Thanks,
    Vincent
  7. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    05 Dec 2016
    03 Jun 2013
    Link to this post
    Hello,

    To avoid 404 when navigating to non existent url configure asp.net custom error pages in web.config
    If you want to remove a page and make sitefinity redirect to predefined page add additional url to the page that will be shown when a user requests a page that doesn`t exist any more, to add additional url to a page choose a page and edit its Title and Properties, in the title and properties dialog add additional url to this page, here is a screenshot.

    Here is the documentation link, its fixed in my previous post too.

    Regards,
    Stanislav Velikov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
7 posts, 0 answered