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

Forums / General Discussions / Configuring a re-direct

Configuring a re-direct

5 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    07 Nov 2010
    Link to this post
    I have a dead subdomain I want to kill, what's the best way to go about it?

    I need any and all requests to that subdomain (regardless of page) to 301 redirect over to the sitefinity root.

    I was thinking change the DNS so the subdomain points to my sitefinity instance, then somehow in SF redirect\rewrite to the www home?

    Thanks.
    Steve
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    07 Nov 2010
    Link to this post
    I think I got it with a custom Module in AppCode to check the request URL

    if (mycontext.Request.Url.AbsoluteUri.StartsWith("http://local.site.com")) {
                    mycontext.Response.Clear();
                    mycontext.Response.Status = "301 Moved Permanently";
                    mycontext.Response.AddHeader("Location", "http://www.site.com/");
                    mycontext.Response.End();
                }
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Nov 2010
    Link to this post
    Hi Steve,

    If you use IIS 7( or higher version), you can use its built-in "Http Redirect" module

    Regards,
    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
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    08 Nov 2010
    Link to this post
    Sadly...this site is stuck on 6 :/
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    08 Nov 2010
    Link to this post
    Hello Steve,

    Then, the custom module you have will do the job.

    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
Register for webinar
5 posts, 0 answered