From: Rich Bowen
<FilesMatch "\.(gif|jpe?g|png)$"> +<FilesMatch ".+\.(gif|jpe?g|png)$"> # ... </FilesMatch>would match most common Internet graphics formats.
+The+.+
at the start of the regex ensures that + files named.png
, or.gif
, for example, + are not matched.From 2.4.8 onwards, named groups and backreferences are captured and written to the environment with the corresponding name prefixed with "MATCH_" and in upper case. This allows elements of files to be referenced @@ -2698,6 +2702,15 @@ matching URLs
would match URLs that contained the substring
+/extra/data
or/special/data
.+If the intent is that a URL starts with +
+ +/extra/data
, rather than merely + contains/extra/data
, prefix the + regular expression with a^
to require this.<LocationMatch "^/(extra|special)/data">+ +From 2.4.8 onwards, named groups and backreferences are captured and written to the environment with the corresponding name prefixed with "MATCH_" and in upper case. This allows elements of URLs to be referenced diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 0f2690d396..07195f24a6 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -1738,13 +1738,17 @@ filenames expression. For example:
-<FilesMatch "\.(gif|jpe?g|png)$"> +<FilesMatch ".+\.(gif|jpe?g|png)$"> # ... </FilesMatch> would match most common Internet graphics formats.
+The +.+
at the start of the regex ensures that + files named.png
, or.gif
, for example, + are not matched.From 2.4.8 onwards, named groups and backreferences are captured and written to the environment with the corresponding name prefixed with "MATCH_" and in upper case. This allows elements of files to be referenced @@ -2711,6 +2715,16 @@ matching URLs
would match URLs that contained the substring
+/extra/data
or/special/data
.+ If the intent is that a URL starts with +
+ +/extra/data
, rather than merely + contains/extra/data
, prefix the + regular expression with a^
to require this.+ <LocationMatch "^/(extra|special)/data"> + +From 2.4.8 onwards, named groups and backreferences are captured and written to the environment with the corresponding name prefixed with "MATCH_" and in upper case. This allows elements of URLs to be referenced