httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank McIsaac <max...@sasktel.net>
Subject Re: [users@httpd] Redirect??
Date Thu, 27 Mar 2003 08:17:45 GMT
        Thanks guys.  I got it to redirect.  There is one problem though:  How
do I get the location bar in the browser to still display
http://www.my_domain.ca/webmail instead of http://192.168.1.102/login.php ?
The file that i am redirecting to is login.php and I didn't write it.  Do I
need to change something in that?  Also, I have full access to these servers as
they are mine.  Thanks again.

Frank

Serge Medentsev wrote:

> ----- 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