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>
Activist
  • 13
  • 1
  • 3

1 Answers1

3

Something like this should work:

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

FilesMatch uses a regex there.

Marco Bizzarri
  • 1,318
  • 1
  • 11
  • 11