www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Soffian <...@cimedia.com>
Subject mod_rewrite/2931: mod_rewrite -U switch in combination with [P] rule doesn't work properly
Date Mon, 31 Aug 1998 14:48:47 GMT

>Number:         2931
>Category:       mod_rewrite
>Synopsis:       mod_rewrite -U switch in combination with [P] rule doesn't work properly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Aug 31 07:50:01 PDT 1998
>Last-Modified:
>Originator:     jay@cimedia.com
>Organization:
apache
>Release:        1.2.6, 1.3.1
>Environment:
Any
>Description:
I have the following mod_rewrite rule set

RewriteEngine on
RewriteCond %{REQUEST_URI} -U
RewriteRule ^/(.*)	http://otherhost/$1 [P]

It doesn't work properly. Here is the rewrite log:

172.16.0.4 - - [31/Aug/1998:10:44:56 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(2) init rewrite engine with requested uri /foo/bar
172.16.0.4 - - [31/Aug/1998:10:44:56 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(3) applying pattern '^/(.*)' to uri '/foo/bar'
172.16.0.4 - - [31/Aug/1998:10:44:56 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cdb54/subreq]
(2) init rewrite engine with requested uri /foo/bar
172.16.0.4 - - [31/Aug/1998:10:44:56 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cdb54/subreq]
(1) pass through /foo/bar
172.16.0.4 - - [31/Aug/1998:10:44:56 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(5) RewriteCond URI (-U) check: path=/foo/bar -> status=200
172.16.0.4 - - [31/Aug/1998:10:44:56 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(4) RewriteCond: input='/foo/bar' pattern='!-U' => not-matched
172.16.0.4 - - [31/Aug/1998:10:44:56 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(1) pass through /foo/bar

I assure you that /foo/bar does not exist on this server, yet the RewriteCond
is getting back a 200 as the result of its subreq lookup. I have confirmed
this behavior under both 1.2.6 and 1.3.1.

Here's a grab at a document that DOES exist on the server:

172.16.0.4 - - [31/Aug/1998:10:47:49 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(2) init rewrite engine with requested uri /index.html
172.16.0.4 - - [31/Aug/1998:10:47:49 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(3) applying pattern '^/(.*)' to uri '/index.html'
172.16.0.4 - - [31/Aug/1998:10:47:49 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cdb54/subreq]
(2) init rewrite engine with requested uri /index.html
172.16.0.4 - - [31/Aug/1998:10:47:49 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cdb54/subreq]
(1) pass through /index.html
172.16.0.4 - - [31/Aug/1998:10:47:49 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(5) RewriteCond URI (-U) check: path=/index.html -> status=200
172.16.0.4 - - [31/Aug/1998:10:47:49 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(4) RewriteCond: input='/index.html' pattern='!-U' => not-matched
172.16.0.4 - - [31/Aug/1998:10:47:49 -0400] [www.redshift.cimedia.com/sid#80b14cc][rid#80cbb44/initial]
(1) pass through /index.html

Same results. 
>How-To-Repeat:
Configure as above and see what you get.
>Fix:
Not at this time.

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]




Mime
View raw message