mod_rewrite ignoring proxy flag
am 30.09.2009 18:32:00 von Alexander.Mueller
Hi,
we are having the following RewriteRule entry configured
RewriteRule ^/(.*)$ https://HOSTNAME/$1 [P]
which generally seems to work, all incoming requests are forwarded to the =
indicated machine, not as redirect but utilising mod_proxy.
The problem starts to occur when a URL contains a question mark
/SOMEPATH?/ANOTHERPATH
these URLs do not seem to be proxied through but are actually sent as =
regular HTTP redirect to the client. I noticed that by separating the =
question mark - like /SOMEPATH/?/ANOTHERPATH - it doesn't show this =
behaviour but again works like mod_proxy.
Would anyone have an explanation for this behaviour?
Thanks,
Alexander
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: mod_rewrite ignoring proxy flag
am 01.10.2009 00:26:11 von Rich Bowen
On Sep 30, 2009, at 12:32 , Alexander Müller wrote:
>
> Hi,
>
> we are having the following RewriteRule entry configured
>
> RewriteRule ^/(.*)$ https://HOSTNAME/$1 [P]
>
> which generally seems to work, all incoming requests are forwarded =20
> to the indicated machine, not as redirect but utilising mod_proxy.
>
> The problem starts to occur when a URL contains a question mark
>
> /SOMEPATH?/ANOTHERPATH
>
> these URLs do not seem to be proxied through but are actually sent =20
> as regular HTTP redirect to the client. I noticed that by separating =20=
> the question mark - like /SOMEPATH/?/ANOTHERPATH - it doesn't show =20
> this behaviour but again works like mod_proxy.
>
> Would anyone have an explanation for this behaviour?
The first thing that comes to mind is that you have a Redirect header =20=
being sent by the back-end. Make sure that you have a ProxyPassReverse =20=
that matches the initial Proxy request so that redirects are =20
intercepted and fixed up.
In this case, SOMEPATH? is probably getting redirected to SOMEPATH/=20
index.html?/ANOTHERPATH, for example.
--
Apache: Nuts To Bolts - Two Day Training @ ApacheCon.
http://us.apachecon.com/c/acus2009/sessions/363=
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: mod_rewrite ignoring proxy flag
am 01.10.2009 15:50:21 von Alexander.Mueller
>>> On 01.10.2009 at 00:26, in message
<7A3D8EAA-2C62-444B-80E5-7C4EEC5FF95A@rcbowen.com>, Rich Bowen
wrote:
>=20
> The first thing that comes to mind is that you have a Redirect header =
=20
> being sent by the back-end. Make sure that you have a ProxyPassReverse =
=20
> that matches the initial Proxy request so that redirects are =20
> intercepted and fixed up.
>=20
> In this case, SOMEPATH? is probably getting redirected to SOMEPATH/=20
> index.html?/ANOTHERPATH, for example.
Thank you very much Rich, this was the crucial hint .... ProxyPassReverse =
did it.
Thanks again!
Alexander
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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