httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From The Gaijin <gai...@gci.net>
Subject Re: [users@httpd] single webpage redirect
Date Sat, 05 May 2007 22:21:50 GMT
On Sat, 2007-05-05 at 14:52 -0700, Dave Henderson wrote:
> Gang,
> 
>     I am trying to perform a redirect to another server when accessing
> a single webpage.  Currently there are two sites connected over a WAN
> that both have Apache running to serve content.  However, just one of
> these locations contains user database information (for logging into
> the websites).  Is it possible to tell Apache that when a specfic URL
> is accessed (eg http://www.sitename.com/login.html) to be redirected
> to the server containing the user database (located at a different IP
> address of course)?  I have looked on their website and don't think
> that the redirect directive will work.  Although something like the
> RedirectMatch may.  Any help would greatly be appreciated.
> 
> Thanks,
> 
> Dave

Make sure mod_rewrite is loaded and add a rule like so:

RewriteEngine On
RewriteRule /login.html http://other.server.domain/login_url [R]

which will redirect all occurences to that page.  Or you could proxy the
connection through to the other server, making it transparent for the
end user:

RewriteRule /login.html http://other.server.domain/login_url [P]

The documentation for mod_rewrite will give you all the details, and
probably a few more ideas as well.

R.


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