httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Medentsev" ...@3000gt.ru>
Subject Re: [users@httpd] Redirect??
Date Thu, 27 Mar 2003 04:43:31 GMT

----- Original Message -----
From: "Vikram" <vikram@popgen.org>
To: <users@httpd.apache.org>
Sent: Thursday, March 27, 2003 5:12 AM
Subject: Re: [users@httpd] Redirect??


> Cool!  This is very easy.  Create a index.html inside /webmail directory
on
> x.x.x.101 that contains following:
> <head>
> <META HTTP-EQUIV="Refresh"
> CONTENT="5;URL=http://www.webmail_on_x.x.x.102">
> </head>

If you have PHP on you "old" server you can do redirection in a much easier
and more elegant way by using header() function. Even better if you can
modify httpd.conf (or .htaccess) file to include "ErrorDocument 404
/404.php" directive and making 404.php file to include the following lines:

<?php
header("Location: http://you-new-server".$_SERVER["REQUEST_URI"]);
?>

Now your "old" server will redirect ANY request (even something like
"http://bla-bla-bla/read.php?f=1&i=15608&t=15608") to the new server making
redirection absolutely transparent to the end-user.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message