473,840 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirecting users to different site

I am moving a web to a new address. The old address will be shut down in
several weeks.

Is there a way to automatically redirect users who come to the old site in
these last few weeks to the appropriate page on the new site?
Jul 22 '05 #1
3 1564
Here's a sample page I've used to redirect the user:

<html>
<head>
<script type="text/javascript"> <!--
// Go to pg.
window.location .href = "http://www.mysite.com/mypage.htm";
//-->
</script>
</head>
</html>

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #2
Dave [D], on Wednesday, June 29, 2005 at 21:36 (-0700) contributed
this to our collective wisdom:

D> Is there a way to automatically redirect users who come to the old site in
D> these last few weeks to the appropriate page on the new site?

Response.Redire ct "http://yourpage.com"

--

How do you protect mail on web? I use http://www.2pu.net

[No free man shall ever be barred the use of arms - Jefferson]

Jul 22 '05 #3
Gazing into my crystal ball I observed Bullschmidt <pa**@bullschmi dt.com-
nospam> writing in news:uV******** *****@TK2MSFTNG P09.phx.gbl:
Here's a sample page I've used to redirect the user:

<html>
<head>
<script type="text/javascript"> <!--
// Go to pg.
window.location .href = "http://www.mysite.com/mypage.htm";
//-->
</script>
</head>
</html>

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


Which will not work for the most important visitor, Google. Better:
<%
dim pagename
pagename = right(request.s ervervariables( "script_name"), instrrev
(pagename,"/")+1) 'you might have to play with this to get the exact page
name.

Response.Status ="301 Moved Permanently"
Response.AddHea der "Location", "http://www.example.com/" & pagename
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title><%=pagen ame%> Moved</title>
</head>
<body>
<h1><%=pagename %> Moved</h1>
<p>The page you have requested has moved to <a href="<%=pagena me%>"><%
=pagename%>. Please change your bookmarks. If your browser has not taken
you to the page automatically, please go to <a href="<%=pagena me%>"><%
=pagename%></a>.</p>
</body>
</html>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1816
by: For Example: John Smith | last post by:
Hi, I thought this was simple to do but I have not had any luck. I would like to have two versions of my web site which are optimised for different browsers. One version for IE and one version for Netscape / Mozilla. How do I redirect visitors to different pages based on their browser? For instance they come to the site and access index.html. If they are using IE, index.html continues to load. If they are using Netscape or
3
1507
by: Marlon | last post by:
I have a site that is now SSL secured. User not still using the http:// to get to the site. How can I redirect the user the the visited page using https:// ?
1
1161
by: hecsan07 | last post by:
I am a novice programmer. I want to give my site the ability to remember users. I want to do this the easiest possible way--using cookies to store username and password--since I am not concerned with security at this point. In the sign on page, I first check for the value of the cookie. If invalid or null, users are requested to log in. I only want to check the value of the cookie in one page. My problem is that if users enter my site via...
3
1165
by: Manfred Bauer | last post by:
Dear all, I have written an ASP.NET application using NT-Authentfication against an Active Directory domain. Users that are logged on have access to an Outlook Web Access site, also using NT-Authentfication (and running on the same machine). Because OWA is implemented as website (not virtual folder) in IIS, my users get the logon-dialog-box twice: first, when they log on to my website, and afterwards when they want to use Outlook Web...
9
1860
by: Denise | last post by:
I have posted a similar message in 2 other forums but got no response. I have spent more hours than I can count researching this. Can anyone provide some insight...? Our ASP.Net application needs to transparently log a user on to a separate secure web site (PHP - not controlled by us). We want to save the user the step of typing in his username and password and having to press submit. I could accomplish this by using the <form...
4
1502
by: Greg Smalter | last post by:
Redirecting from page to page within a web project is pretty easy. However, all Redirect methods take strings as arguments, as if you mistype the string, you don't find out until run time that you are redirecting to somewhere that doesn't exist. Worse, if you do type it correctly, but then later the page name changes or the page moves, you still won't find out until run time. I have a framework that solves this problem and guarantees,...
8
5794
by: Morpheus | last post by:
I am trying to test a function that outputs text to the standard output, presumably using a cout call. I do not have access to the source, but need to test the output. Is this possible? I can technically create an executable that calls the function and then using a command prompt call the exexutable using the > output.txt redirector but I would prefer to do everything within the application itself. Is there a way for force an output...
41
3256
by: amygdala | last post by:
Hello all, I have posted a similar question in comp.lang.php in the past, but haven't had any response to it then. I kinda swept the problem under the rug since then. But I would really like to resolve this issue once and for all now. The problem might be PHP related but since I only develop applications using PHP, I'm not a hundred percent sure. Therefor I've taken the liberty to crosspost to comp.lang.php and alt.www.webmaster. I...
9
2353
by: Jonathan Wood | last post by:
I've spent days trying to come up with a solution. I'd appreciate it if anyone can help. My site requires all users to log on. There are three different roles of users, and each user type will have access to a completely different set of pages. "Client" pages are in the root folder and "Admin" and "Trainer" pages each have their own subfolders. The problem is that when a user goes to the domain, I want to redirect "Admin" and...
0
9699
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10605
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10301
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9444
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7839
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3139
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.