Posts Tagged ‘301 redirect’

Redirecting a website to a different website

Saturday, February 6th, 2010

Just like anyone asks the local post office to forward the letters when they move is applicable to websites also. As an example our table tennis store e-commerce site was hosted in a dot net nuke platform in 2008. The site was called Table Tennis Network. In 2009, it was moved to a high end e-commerce platform and to a new domain TableTennisStore.US. This is where we had to use 301 redirects to redirect the old website to the new one.

There are few ways you can redirect your old site to the new one:

1. Using a .htaccess file at the root of the site, the old site can be redirected to a new web site.

2. Using URL re-write settings in the web.config file, the re-direction is possible.

3. By manipulating the header section of the default page, it is possible to re-direct.

Here is a piece of code in vb-script to do this trick:

<%@ language=”VBScript” %><%
‘ Permanent redirection
Response.Status = “301 Moved Permanently”
Response.AddHeader “Location”, “http://www.tabletennisstore.us”
Response.End
%>

The above code will redirect the site where it has the default.aspx file to a new website http://www.tabletennisstore.us.