httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Severin Gehwolf <>
Subject Re: [users@httpd] URL redirection
Date Thu, 20 Dec 2007 09:56:16 GMT

> Could you please advise if this can be done in apache?
> http://server1/OpenObject?doc=ERW
> to be redirected to:
> http://server2:9000/OpenObject?doc=ERW
> I mean everything that starts with /OpenObject to be
> redirected to server2:9000 with the same trailing
> string /OpenObject?doc=ERW or /OpenObject?doc=ERW1
> …etc.

In your httpd configuration of "server1" put the following (have
mod_rewrite, mod_proxy and mod_proxy_http loaded). I assume you would
like to have it transparent for the user. Therefore I suggest proxying
the requests like so:

RewriteEngine On
RewriteRule ^/(OpenObject.*) http://server2:9000/$1 [P,L]
ProxyPassReverse / http://server1/

or just by permanent (cachable) redirect (no mod_proxy needed):

RewriteEngine On
RewriteRule ^/(OpenObject.*) http://server2:9000/$1 [R=301,L]


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message