April 16th, 2011, 03:59 AM
Url Redirection In ASP
I have a website in asp, I am moving old website to new website in asp only which is having new template, new links etc.
For both old and new website the back end is SQL SERVER 2008.
But as my old website links are live in google, so I want to redirect all the old links of the old site to the new links of the new site, so that old links should not treated as NOT FOUND or broken links in Google.
How to implement this in ASP.
Please provide me the reference to solve this issue.
redirect in html
if your old pages are html, then add a meta tag like this in the head:
if your old pages are .aspx files, then replace all code in that file with this code:
<meta http-equiv="REFRESH" content="0; url=http://www.google.com" />
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Private Sub Page_Load(sender As Object, e As EventArgs)
If (Response.IsClientConnected) Then
<html xmlns="http://www.w3.org/1999/xhtml" >