0

For poorly configured Apache servers you can have to do something like this to deny access to the .htaccess file:

<Files .htaccess>
order allow,deny
deny from all
</Files>

I would like to deny access to all system files (.* - any file that it's filename starts with a dot). I know it's possible with FilesMatch...

Something like this (but working):

<FilesMatch .*>
order allow,deny
deny from all
</FilesMatch>
3

Something like this should work:

<FilesMatch "^\.(.*)$">
   order allow,deny
   deny from all
</FilesMatch>

FilesMatch uses a regex there.

  • 1
    just ... do not forget the closing " :) – LazyOne Jul 21 '11 at 23:41
  • @LazyOne: right, fixed ;) – Marco Bizzarri Jul 22 '11 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.