mod_proxy : ProxyPassReverse and regex ?

mod_proxy : ProxyPassReverse and regex ?

am 25.08.2009 17:05:30 von Guillaume Fraysse

--0023545bf54858bd310471f8aa50
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello to the list,

I'm trying to put up some vodoo Reverse Proxy Configuration on 2.2.11
(64bits, linux) apache build.
What I'm trying to achieve is that all URL such as
https://my.domain.com/alice/bob/xxx are redirected to intranet URLs such as
http://alice.intranet/alice/bob/xxx

I'm using regex, mod_rewrite and mod_proxy for that and it's working just
fine but I'm facing a problem when one of the web application behind my
reverse proxy use a "Location:" header. In this case the user gets an
intranet URL which he can't access. ProxyPassReverse semmes to be the
adequate answer but doens't seem to support regex

Sample :
I currently have :
RewriteCond %{REQUEST_URI} ^/(.*)/bob.*
RewriteRule ^/(.*)/bob(.*) http://$1.intranet/$1/bob$2 [P,L] and this works
fine

it seems natural to have a rule such as :
ProxyPassReverse /(.*)/bob/ http://$1.intranet/$1/bob

but this doesn't seem to be possible with ProxyPassReverse.

So I have a few questions :
- are regex supported in ProxyPassReverse ?
- is there a workaround ? I'd like to avoid hard-coded ProxyPassReverse
rules in my apache configuration.

Best regards,
Guillaume

--0023545bf54858bd310471f8aa50
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello to the list,

I'm trying to put up some vodoo Reverse Proxy=
Configuration on 2.2.11 (64bits, linux) apache build.
What I'm tryi=
ng to achieve is that all URL such as e/bob/xxx">https://my.domain.com/alice/bob/xxx are redirected to intran=
et URLs such as http://alic=
e.intranet/alice/bob/xxx



I'm using regex, mod_rewrite and mod_proxy for that and it's wo=
rking just fine but I'm facing a problem when one of the web applicatio=
n behind my reverse proxy use a "Location:" header. In this case =
the user gets an intranet URL=A0 which he can't access. ProxyPassRevers=
e semmes to be the adequate answer but doens't seem to support regex >

Sample :
I currently have :
RewriteCond %{REQUEST_URI} ^/(.*)/bob=
..*
RewriteRule ^/(.*)/bob(.*) http://$1.intranet/$1/bob$2 [P,L] and this=
works fine

it seems natural to have a rule such as :
ProxyPassRe=
verse /(.*)/bob/ http://$1.intranet/$1/bob


but this doesn't seem to be possible with ProxyPassReverse.

=
So I have a few questions :
- are regex supported in ProxyPassReverse ?=

- is there a workaround ? I'd like to avoid hard-coded ProxyPassRev=
erse rules in my apache configuration.


Best regards,
Guillaume


--0023545bf54858bd310471f8aa50--