views:

87

answers:

1

Hello,

This is working:

<Files *.fileext>
      Order Allow,Deny
      Deny from all
</Files>

This is not:

<Files *.fileext|somedirectory>
      Order Allow,Deny
      Deny from all
</Files>

Please help.

A: 

Files does not allow the use of regular expressions, but FilesMatch does, therefore it searches for a file with (something).fileext|somedirectory in the path, and this is not what you want to do. Your code will have to look like this:

<FilesMatch (\.fileext$|^somedirectory$)>
    Order Allow,Deny
    Deny from all
</FilesMatch>

see http://httpd.apache.org/docs/1.3/mod/core.html#files and http://httpd.apache.org/docs/1.3/mod/core.html#filesmatch

Residuum