>Number: 3923
>Category: mod_rewrite
>Synopsis: mod_rewite rule disables mod_access functionality
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Fri Feb 19 09:20:00 PST 1999
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: tested on 1.3.2 & 1.3.4
>Environment:
BSD/OS ts2.golden.net 2.1 BSDI BSD/OS 2.1 Kernel #0: Mon Nov 17 15:20:31 EST
1997 [EMAIL PROTECTED]:/usr/src/sys/compile/webserver27.1 i386
gcc version 2.7.2
>Description:
A Simple rewrite rule. With this rule in place, .htaccess files do not work.
RewriteCond %{REQUEST_FILENAME} !^/~(.*)$
RewriteCond %{REQUEST_FILENAME} !^/cgi-bin/(.*)$
RewriteRule ^/(.*) http://welcome.golden.net/$1 [R,L]
Tried diabling rewrite engine -- htaccess works.
Enabled engine, no rules -- htaccess works.
Plop in the above rule -- htaccess immediatly returns a 401 error.
Tried IE5 vs Communicator -- no diff.
here is a level 5 rewrite snippit:
199.166.210.251 - - [19/Feb/1999:12:06:50 -0500]
[www.golden.net/sid#85034][rid#ae034/initial] (2) init rewrite engine with
requested uri /~lee/fuck/
199.166.210.251 - - [19/Feb/1999:12:06:50 -0500]
[www.golden.net/sid#85034][rid#ae034/initial] (3) applying pattern '^/(.*)' to
uri '/~lee/fuck/'
199.166.210.251 - - [19/Feb/1999:12:06:50 -0500]
[www.golden.net/sid#85034][rid#ae034/initial] (4) RewriteCond:
input='/~lee/fuck/' pattern='!^/~(.*)$' => not-matched
199.166.210.251 - - [19/Feb/1999:12:06:50 -0500]
[www.golden.net/sid#85034][rid#ae034/initial] (1) pass through /~lee/fuck/
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (2) init rewrite engine
with requested uri /errormessage/401.html
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (3) applying pattern
'^/(.*)' to uri '/errormessage/401.html'
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (4) RewriteCond:
input='/errormessage/401.html' pattern='!^/~(.*)$' => matched
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (4) RewriteCond:
input='/errormessage/401.html' pattern='!^/cgi-bin/(.*)$' => matched
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (2) rewrite
/errormessage/401.html -> http://welcome.golden.net/errormessage/401.html
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (2) explicitly forcing
redirect with http://welcome.golden.net/errormessage/401.html
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (1) escaping
http://welcome.golden.net/errormessage/401.html for redirect
199.166.210.251 - - [19/Feb/1999:12:06:51 -0500]
[www.golden.net/sid#85034][rid#af504/initial/redir#1] (1) redirect to
http://welcome.golden.net/errormessage/401.html [REDIRECT/302]
>How-To-Repeat:
create a simple .htaccess and password file, and use the provided rewrite rule..
>Fix:
soon? :)
>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 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! ]