Redirect from http://myDomain.com to http://www.myDomain.com

Discussion in 'Hosting Services / Control Panel' started by Bruce, Jun 7, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

  2. Hello,

    I wish to redirect all traffic coming to myDomain.com to www.myDomain.com. How do I do this? I am aware of page redirects something like ..

    <%@ Page Language='C#' %><script runat='server'>
    private void Page_Load(object sender, System.EventArgs e)
    {
    Response.Status = '301 Moved Permanently'; Response.AddHeader('Location','http://www.mydomain.com/folder/abc.aspx');
    }
    </script>

    The above code is for individual pages only. How to accomplish this if the traffic is to root domain? That is if the page request is for http://myDomain.com/folder/abc.aspx then it should be redirected to http://www.myDomain.com/folder/abc.aspx.

    Can somebody help me?


    Kantreddi
    www.FireCAD.net

    Post Edited (Kantreddi) : 6/7/2006 12:53:37 PM GMT
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page