>Number: 5229 >Category: mod_rewrite >Synopsis: RewiteCond -U reports the wrong status code >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Nov 1 11:40:02 PST 1999 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3.9 >Environment: FreeBSD 3.2-R, 3.3-R >Description: Using RewiteCond -U I always get a 200 status code for any URL tested. In the example below I try to test if /kkkkkk URL exists (it doesn't) and as shown by the attached logs it thinks the URL is OK.
And no, there is not another Alias or rewrite rule or anything that makes /kkkkkk a valid URL. It isn't, and should report 404, not 200. It is possible that the problem is in ap_sub_req_method_uri. RewriteLogLevel 9 RewriteCond /kkkkkk !-U RewriteCond %{REMOTE_ADDR} !10.0.0.3 (...) RewriteRule ^/med/.* /servlet/session [PT,NS] 10.0.0.4 - - [01/Nov/1999:20:10:46 +0100] [salud.hin/sid#806ce6c][rid#80b9034/subreq] (2) init rewrite engine with requested uri /kkkkkk 10.0.0.4 - - [01/Nov/1999:20:10:46 +0100] [salud.hin/sid#806ce6c][rid#80b9034/subreq] (3) applying pattern '^/1/(.*)' to uri '/kkkkkk' 10.0.0.4 - - [01/Nov/1999:20:10:46 +0100] [salud.hin/sid#806ce6c][rid#80b9034/subreq] (3) applying pattern '^/vade/.*' to uri '/kkkkkk' 10.0.0.4 - - [01/Nov/1999:20:10:46 +0100] [salud.hin/sid#806ce6c][rid#80b9034/subreq] (1) pass through /kkkkkk 10.0.0.4 - - [01/Nov/1999:20:10:46 +0100] [salud.hin/sid#806ce6c][rid#8088034/initial] (5) RewriteCond URI (-U) check: path=/kkkkkk -> status=200 10.0.0.4 - - [01/Nov/1999:20:10:46 +0100] [salud.hin/sid#806ce6c][rid#8088034/initial] (4) RewriteCond: input='/kkkkkk' pattern='!-U' => not-matched >How-To-Repeat: >Fix: >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, you need] [to include <[EMAIL PROTECTED]> in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database 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! ]