httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 61108] New: RewriteCond -f caches results after first test
Date Fri, 19 May 2017 18:41:01 GMT

            Bug ID: 61108
           Summary: RewriteCond -f caches results after first test
           Product: Apache httpd-2
           Version: 2.4.25
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
  Target Milestone: ---

In Apache 2.2, we had a RewriteCond rule that tested for the existence of a
specific file and redirect most requests to a static HTML file when the file
existed.  Creating the file while apache was running would cause the static
HTML file to be displayed immediately, and removing the file while apache was
running would bypass the RewriteRule.  The set of rules is:

RewriteCond /opt/app/workload/nas/reldir/dev3/cmnshr/maintenance/wiki.txt -f
RewriteCond %{HTTP_COOKIE} !AllowMaintenance
RewriteCond %{REQUEST_URI} !^/cmn/(.*)
RewriteCond %{REQUEST_URI} !^/common/(.*)
RewriteRule ^/.* /cmn/maintenance-wiki.html [NE,L,P]

With version 2.4, it appears that apache is caching the result of the -f test. 
Thus, creating the file while apache is running has no effect.  Restarting
apache after creating the file causes the test to behave as expected.  However,
apache must be restarted for the removal of the file to be effective as well.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message