https://issues.apache.org/bugzilla/show_bug.cgi?id=47392

           Summary: <FilesMatch> is using the wrong directory
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The <FilesMatch> directive is using the superior directory if the access
through the URL is without a / at the end. Here is an example for better
understanding:

I created in the htdocs directory a new directory and named it test. In this
directory have i created a .htaccess with the content:

Allow from all
<FilesMatch ^test>
Deny from all
</FilesMatch>

And there are two empty files named test.php and another_file.php. Now the
following happens:

http://localhost/test -> Error 403 forbidden
http://localhost/test/ -> Access is allowed and i can see the index
http://localhost/test/test.php -> Error 403 forbidden
http://localhost/test/another_file.php -> Access is allowed

The problem is, that ^test matches of the superior directory if there is no /
at the end of the URL and the access is denied. If i delete the .htaccess the
following happens:

http://localhost/test -> Switches to http://localhost/test/ and the i can see
the index
http://localhost/test/ -> Access is allowed and i can see the index
http://localhost/test/test.php -> Access is allowed
http://localhost/test/another_file.php -> Access is allowed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to