The <Files> directive provides for access control by
filename. It is comparable to the
<Directory> directive and
<Location> directives. It should be matched with a
</Files> directive. The directives given within this section
will be applied to any object with a basename (last component of
filename) matching the specified filename.
<Files>
sections are processed in the order they
appear in the configuration file, after the <Directory>
sections and .htaccess
files are read, but before
<Location> sections. Note that <Files> can be nested
inside <Directory> sections to restrict the portion of the
filesystem they apply to.
The filename argument should include a filename, or a
wild-card string, where `?' matches any single character, and `*'
matches any sequences of characters. Extended regular expressions
can also be used, with the addition of the ~
character. For example:
<Files ~ "\\\\.(gif|jpe?g|png)\$">would match most common Internet graphics formats. In Apache 1.3 and later, <FilesMatch> is preferred, however.
Note that unlike
<Directory>
and
<Location>
sections, <Files>
sections can be used inside .htaccess files. This allows users to
control access to their own files, at a file-by-file level.
See also: How Directory, Location and Files sections work for an explanation of how these different sections are combined when a request is received