473,396 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

redirection

Hi - I have an obsolete site residing in a host domain sub-directory, many
pages of which are listed in google. Dont want to lose valuable google
listings.

Can anyone tell me how to re-direct .htm pages? If the whole site were
deleted, is it possible to customise the 404 page not found page so that it
re-directs to the new site?

Thanks

Hugh
Apr 25 '06 #1
6 1349

Hugh Welford wrote:
Hi - I have an obsolete site residing in a host domain sub-directory, many
pages of which are listed in google. Dont want to lose valuable google
listings.

Can anyone tell me how to re-direct .htm pages? If the whole site were
deleted, is it possible to customise the 404 page not found page so that it
re-directs to the new site?

Thanks

Hugh


<meta http-equiv="refresh" content="n(secs);
url=http://www.wherever.com/newfile" />

but you really should have asked this question in an html group.

--
Mike Brind

Apr 26 '06 #2

Mike Brind wrote:
Hugh Welford wrote:
Hi - I have an obsolete site residing in a host domain sub-directory, many
pages of which are listed in google. Dont want to lose valuable google
listings.

Can anyone tell me how to re-direct .htm pages? If the whole site were
deleted, is it possible to customise the 404 page not found page so that it
re-directs to the new site?

Thanks

Hugh


<meta http-equiv="refresh" content="n(secs);
url=http://www.wherever.com/newfile" />

but you really should have asked this question in an html group.


On the other hand, asking this question in an asp group isn't so wrong:

<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.wherever.com/newfile"
%>

I nearly forgot all about that :-)

--
Mike Brind

Apr 26 '06 #3
Mike Brind wrote on 26 apr 2006 in
microsoft.public.inetserver.asp.general:
Hugh Welford wrote:
Hi - I have an obsolete site residing in a host domain sub-directory,
many pages of which are listed in google. Dont want to lose valuable
google listings.

Can anyone tell me how to re-direct .htm pages? If the whole site
were deleted, is it possible to customise the 404 page not found
page so that it re-directs to the new site?

Thanks

Hugh


<meta http-equiv="refresh" content="n(secs);
url=http://www.wherever.com/newfile" />

but you really should have asked this question in an html group.


... except when this old site is equiped with ASP and set to run ASP on
it's .html pages. Then you could set on each page:

<%
response.redirect "http://mynewsite.xyz" &_
request.servervariables("SCRIPT_NAME")
%>

=============

... or: when this old site is equiped with ASP and and has a dedicated
404.asp page, that is code accessable to you, and could be set to detect
the actual failed page request and redirect accordingly.

=============

However, I then would recomment making a noindex, follow construction for
updating the bots.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 26 '06 #4
Mike Brind wrote on 26 apr 2006 in microsoft.public.inetserver.asp.general:
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.wherever.com/newfile"
%>


That is even better!

and it could be implemented on a dedicated 404.asp, I suppose.

Does Response.AddHeader "Location",.. do an immediate redirect,
or after a Response.end?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 26 '06 #5

Evertjan. wrote:
Mike Brind wrote on 26 apr 2006 in microsoft.public.inetserver.asp.general:
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.wherever.com/newfile"
%>


That is even better!

and it could be implemented on a dedicated 404.asp, I suppose.

Does Response.AddHeader "Location",.. do an immediate redirect,
or after a Response.end?


After Response.End. On an asp page that has a load of calls to
databases, it would be worth popping Response.End just after
Response.Addheader "Location",... to save the rest of the page being
processed. Since the OP has plain html in his files, it's not so
necessary, but as you point out, he would have to set his server up to
run .htm files as asp.

I don't think he would need a 404 page. After a few months, the search
engines that index the old site should all have updated their indexes,
so deleting the old site without repercussions should be ok.

--
Mike Brind

Apr 26 '06 #6
Thanks very much guys - very helpful
"Hugh Welford" <hu**********@btinternet.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi - I have an obsolete site residing in a host domain sub-directory, many
pages of which are listed in google. Dont want to lose valuable google
listings.

Can anyone tell me how to re-direct .htm pages? If the whole site were
deleted, is it possible to customise the 404 page not found page so that
it re-directs to the new site?

Thanks

Hugh

Apr 26 '06 #7

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

Similar topics

2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
52
by: Gerard M Foley | last post by:
Can one write a webpage which is not displayed but which simply redirects the user to another page without any action by the user? Sorry if this is simple, but I am sometimes simple myself. ...
15
by: Taki Jeden | last post by:
Hello everybody Does anybody know why w3c validator can not get pages that use 404 htaccess redirection? I set up two web sites so that clients request non-existent urls, but htaccess redirects...
2
by: Nadav | last post by:
Hi, Introduction: *************** I am trying to redirect stdout to a RichEdit control, this is done by initiating a StringWriter, associated it with a StringBuilder and setting the...
0
by: Dimitrios Mpougas | last post by:
Hello, I have two asp.net pages. The first is a page (main.aspx) wich has four links on it. The href value of each link is: href="view.aspx?id=1" traget="_blank" href="view.aspx?id=2"...
8
by: Luciano A. Ferrer | last post by:
Hi! I was following the http://www.seomoz.org/articles/301-redirects.php article, trying to do that with one of my test sites I added this to the .htaccess file: RewriteEngine On RewriteCond...
13
by: souissipro | last post by:
Hi, I have written a C program that does some of the functionalities mentionned in my previous topic posted some days ago. This shell should: 1- execute input commands from standard input,...
1
by: comp.lang.php | last post by:
require_once("/users/ppowell/web/php_global_vars.php"); if ($_GET) { // INITIALIZE VARS $fileID = @fopen("$userPath/xml/redirect.xml", 'r'); $stuff = @fread($fileID,...
4
by: psual | last post by:
hi newbie in web design I got some issue concerning a secure redirection between 2 pages let say I have a page with a grid (the 'master' page) in this grid I can select a record, get its pk...
13
by: Massimo Fabbri | last post by:
Maybe it's a little OT, but I'll give it try anyway.... I was asked to maintain and further develop an already existing small company's web site. I know the golden rule of "eternal" URIs, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...
0
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...

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.