apache_1.3.32 woes (rewrite + proxy)
am 26.10.2004 15:46:19 von Ricardo OliveiraHi,
I've found a problem with Rewriterule's flags, especially [P]. My
setup is as follows:
* apache compiled statically with mod_rewrite, mod_proxy, mod_ssl,
mod_php and several other modules from the base package.
My server acts, for a particular subset of the sites we host, as a
"hidden frame redirector" - that is, it uses a rewriterule with the [P]
flag, so that mod_proxy fetches the real URL and masks the real URL with
a cleaner one. An example:
servername is www.co.pt
several
with the following configuration:
ServerName yyy.co.pt
RewriteEngine On
RewriteRule /
http://www.co.pt/script.php?domain=yyy&url=http://real.site. com/ [P]
This setup works perfectly until I upgraded to apache 1.3.32 - instead
of being redirected to script.php?domain=xxx...., apache tries to open
the file "script.php?domain=yyy&url=http://real.site.com/" - which,
obviously, does not exist on the filesystem.
Apparently, mod_rewrite behaves differently before and after the upgrade.
apache_1.3.31:
212.113.164.103 - - [26/Oct/2004:12:42:29 +0100]
[www.yyy.co.pt/sid#8849e2c][rid#863ac24/initial] (2) init rewrite engine
with requested uri /
212.113.164.103 - - [26/Oct/2004:12:42:29 +0100]
[www.yyy.co.pt/sid#8849e2c][rid#863ac24/initial] (3) applying pattern
'/' to uri '/'
212.113.164.103 - - [26/Oct/2004:12:42:29 +0100]
[www.yyy.co.pt/sid#8849e2c][rid#863ac24/initial] (2) rewrite / ->
http://www.co.pt/script.php?domain=yyy.co.pt&url=http://real .site.com/
212.113.164.103 - - [26/Oct/2004:12:42:29 +0100]
[www.yyy.co.pt/sid#8849e2c][rid#863ac24/initial] (3) split
uri=http://www.co.pt/script.php?domain=yyy.co.pt&url=http:// real.site.com/
-> uri=http://www.co.pt/script.php,
args=domain=yyy.co.pt&url=http://real.site.com/
212.113.164.103 - - [26/Oct/2004:12:42:29 +0100]
[www.yyy.co.pt/sid#8849e2c][rid#863ac24/initial] (2) forcing
proxy-throughput with http://www.co.pt/script.php
212.113.164.103 - - [26/Oct/2004:12:42:29 +0100]
[www.yyy.co.pt/sid#8849e2c][rid#863ac24/initial] (1) go-ahead with proxy
request proxy:http://www.co.pt/script.php [OK]
apache_1.3.32:
212.113.164.103 - - [26/Oct/2004:12:45:01 +0100]
[www.yyy.co.pt/sid#8859cf4][rid#8644994/initial] (2) init rewrite engine
with requested uri /
212.113.164.103 - - [26/Oct/2004:12:45:01 +0100]
[www.yyy.co.pt/sid#8859cf4][rid#8644994/initial] (3) applying pattern
'/' to uri '/'
212.113.164.103 - - [26/Oct/2004:12:45:01 +0100]
[www.yyy.co.pt/sid#8859cf4][rid#8644994/initial] (2) rewrite / ->
http://www.co.pt/script.php?domain=yyy.co.pt&url=http://real .site.com/212.113.164.103
- - [26/Oct/2004:12:45:01 +0100]
[www.yyy.co.pt/sid#8859cf4][rid#8644994/initial] (3) split
uri=http://www.co.pt/script.php?domain=yyy.co.pt&url=http:// real.site.com/
-> uri=http://www.co.pt/script.php,
args=domain=yyy.co.pt&url=http://real.site.com/
212.113.164.103 - - [26/Oct/2004:12:45:01 +0100]
[www.yyy.co.pt/sid#8859cf4][rid#8644994/initial] (2) forcing
proxy-throughput with http://www.co.pt/script.php
212.113.164.103 - - [26/Oct/2004:12:45:01 +0100]
[www.yyy.co.pt/sid#8859cf4][rid#8644994/initial] (1) go-ahead with proxy
request
proxy:http://www.co.pt/script.php?domain=yyy.co.pt&url=http: //real.site.com/
[OK]
I know that several changes from 1.3.31 to 1.3.32 were related to
mod_proxy and mod_rewrite, but these do not seem to explain this
particular problem.
Is anyone else having these problems?
Regards,
Ricardo Oliveira
--
Ricardo Manuel Oliveira
Eurotux Informática, SA
Tel: +351 253257395 // +351 919475934
Fax: +351 253257396
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See
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