Is it possible to use a wildcard (*) in the tag of .htaccess

.htaccessapache-2.2

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>

Now is it possible to use a wildcard in the filename? I would like to deny access to all system files (.* – any file that it's filename starts with a dot). I would like to know if the following would work for what I want:

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

Best Answer

What you need there is FilesMatch:

<FilesMatch "^\.">
    [config]
</FilesMatch>

(The pattern is a regexp, rather than a glob, though).

More Info here