FilesMatch
allows FilesMatch
to match files using a regular expression.
In the FilesMatch
above, you have 4 sets of regular expressions, where 1 set has an extra extra set.
Basically, this is denied access (error 403) to any of the found files that are described in your regular expression sets.
For instance:
\.(engine|inc ...)$|
So, if the file ends with .engine or .inc or ... the rest of the rule prohibits access to it.
Then at the end of the first set of rules you have |
, which, as in the previous example, means OR
, therefore, if the first set of rules does not match, it starts the second, which is slightly different.
^(\..*|Entries.*|Repository)$
Here it is done the other way around, it matches if the file starts and ends with the given keyword, for example:
If the file starts with .
followed by something, ( .*
) means something else, such as .htaccess
or begins with Entries
, followed by something, or itβs for sure a repository or ... to the end.
Then the following rule ^#.*#$
, This means that the file begins and ends with the #
symbol as #
, which is processed literally
And the last set of rules does the same in the first scan if the file ends with the specified extensions.
If you want to know more, I suggest you learn more about Perl Compatible Regular Exions (PCRE)