ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 16th, 2011, 02:59 AM
shikharoy shikharoy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 1 shikharoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m
Reputation Power: 0
Send a message via AIM to shikharoy
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.

Reply With Quote
  #2  
Old May 18th, 2011, 06:47 AM
System.Exit(0) System.Exit(0) is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 21 System.Exit(0) User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 34 m 6 sec
Reputation Power: 0
redirect in html

if your old pages are html, then add a meta tag like this in the head:

Code:
<meta http-equiv="REFRESH" content="0; url=http://www.google.com" />


if your old pages are .aspx files, then replace all code in that file with this code:

Code:
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    Private Sub Page_Load(sender As Object, e As EventArgs)
        If (Response.IsClientConnected) Then
            Response.Redirect("http://www.google.com", False)
        Else
            Response.End()
        End If
    End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
</head>
<body>
</body>
</html>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Url Redirection In ASP

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap