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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to