Forum Moderators: phranque

Message Too Old, No Replies

rewrite problem

rewrite problem

         

ashwink

2:20 pm on Jun 12, 2007 (gmt 0)

10+ Year Member



I am porting my application from Apache 1.3 to Apache2
This the part of my httpd.conf used to redirect.

<IfModule rewrite_module>
RewriteEngine On
RewriteRule ^/servlets(.*) [10.240.1.86:7601...] [P]
RewriteRule ^/jsp(.*) [10.240.1.86:7601...] [P]
RewriteCond %{REQUEST_METHOD} ^(TRACE¦TRACK)
RewriteRule .* - [F]
RewriteLog /home/sites/current/logs/rewrite.log
RewriteLogLevel 9
</IfModule>

The same code works on Apache 1.3 but fails to redirect on Apache2.

The respective logs in rewrite.log are as follows:

Apache1.3:
10.240.1.42 - - [12/Jun/2007:11:32:39 +0530] [10.240.1.13/sid#9d2c05c][rid#9f69a24/initial] (2) init rewrite engine with requested uri /servlets/My_Server
10.240.1.42 - - [12/Jun/2007:11:32:39 +0530] [10.240.1.13/sid#9d2c05c][rid#9f69a24/initial] (3) applying pattern '^/servlets(.*)' to uri '/servlets/My_Server'
10.240.1.42 - - [12/Jun/2007:11:32:39 +0530] [10.240.1.13/sid#9d2c05c][rid#9f69a24/initial] (2) rewrite /servlets/My_Server -> [10.240.1.13:9201...]
10.240.1.42 - - [12/Jun/2007:11:32:39 +0530] [10.240.1.13/sid#9d2c05c][rid#9f69a24/initial] (2) forcing proxy-throughput with [10.240.1.13:9201...]
10.240.1.42 - - [12/Jun/2007:11:32:39 +0530] [10.240.1.13/sid#9d2c05c][rid#9f69a24/initial] (1) go-ahead with proxy request proxy:http://10.240.1.13:9201/servlets//My_Server [OK]

Apache2:
10.240.1.42 - - [11/Jun/2007:06:12:30 +051800] [10.240.1.86/sid#92fdb28][rid#93bad08/initial] (2) init rewrite engine with requested uri /servlets/My_Server
10.240.1.42 - - [11/Jun/2007:06:12:30 +051800] [10.240.1.86/sid#92fdb28][rid#93bad08/initial] (3) applying pattern '^/servlets(.*)' to uri '/servlets/My_Server'
10.240.1.42 - - [11/Jun/2007:06:12:30 +051800] [10.240.1.86/sid#92fdb28][rid#93bad08/initial] (2) rewrite '/servlets/My_Server' -> 'http://10.240.1.86:7601/servlets//My_Server'
10.240.1.42 - - [11/Jun/2007:06:12:30 +051800] [10.240.1.86/sid#92fdb28][rid#93bad08/initial] (2) forcing proxy-throughput with [10.240.1.86:7601...]

If you observe the "go-ahead with proxy request proxy" is missing.

I see someone posted a similiar problem, but did not find the solution.

Can someone suggest here please

~Ash

jdMorgan

3:11 pm on Jun 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's a proxy throughput, not a redirect, and depends on the proxy configuration directives to work. So have a look at the section of httpd.conf or conf.d that defines the reverse proxy on the Apache 2 server -- The problem may be there.

Jim