[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-bugdb
Subject: mod_rewrite/6468: RewriteCond not properly using [NC] (no case) flag
From: Matthew Keller <kellermg () potsdam ! edu>
Date: 2000-08-25 15:45:57
[Download RAW message or body]
> Number: 6468
> Category: mod_rewrite
> Synopsis: RewriteCond not properly using [NC] (no case) flag
> Confidential: no
> Severity: serious
> Priority: medium
> Responsible: apache
> State: open
> Quarter:
> Keywords:
> Date-Required:
> Class: sw-bug
> Submitter-Id: apache
> Arrival-Date: Fri Aug 25 08:50:00 PDT 2000
> Closed-Date:
> Last-Modified:
> Originator: kellermg@potsdam.edu
> Release: 1.3.12
> Organization:
apache
> Environment:
Linux armkreuz.potsdam.edu 2.2.14-5.0smp #2 SMP Thu Jun 22 12:58:37 EDT 2000 i686 \
unknown gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> Description:
I've got an environment where both /home/groups and /home/users have to appear on the \
root of a virtual host. To cut to the chase, I'm using mod_rewrite to do this, and it \
works great. The problem, is that I'm also using mod_speling to correct \
mis-capitalized URI's (I just moved them from a Mac webserver that was \
case-insensitive to a Linux+Apache solution *cheers*).
The RewriteCond line is as follows: RewriteCond /home/users%{REQUEST_FILENAME} -F \
[NC] Below is a line from the rewrite log that "looks up" a file, and says "not \
matched" but the file DOES exist, it's just ending with '.GIF' instead of '.gif' \
137.143.111.133 - - [25/Aug/2000:10:57:29 -0400] \
[www2.potsdam.edu/sid#81002dc][rid#810862c/initial] (4) RewriteCond: \
input='/home/users/sipherjd/gif/jdspict.gif' pattern='-F' => not-matched
I really don't think this is because I've mis-configured mod_rewrite, as it DOES do \
what it needs to do, it's just not ignoring the case of the files and producing a \
'match' when it should. For giggles, the relevant portions of the .conf are below.
DocumentRoot /home/managed/groups
RewriteCond /home/managed/groups%{REQUEST_FILENAME} -F [NC]
RewriteRule ^(.+) - [PT] [L]
RewriteCond /home/users%{REQUEST_FILENAME} -F [NC]
RewriteRule ^(.+) /home/users$1 [L]
RewriteRule ^(.+) - [PT] [L]
> How-To-Repeat:
Doesn't work - http://www2.potsdam.edu/sipherjd/gif/jdspict.gif
Works - http://www2.potsdam.edu/sipherjd/gif/jdspict.GIF
> Fix:
Um, make 'NC' work? Or slap me around if it's my bad.
> Release-Note:
> 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 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! ]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic