Changes with Apache 2.3.9
+ *) core: DirectoryMatch can now match on the end of line character ($),
+ and sub-directories of matched directories are no longer implicitly
+ matched. PR49809 [Eric Covener]
Changes with Apache 2.3.8
</table>
<p><code class="directive"><DirectoryMatch></code> and
<code></DirectoryMatch></code> are used to enclose a group
- of directives which will apply only to the named directory and
- sub-directories of that directory, the same as <code class="directive"><a href="#directory"><Directory></a></code>. However, it
- takes as an argument a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular
- expression</a>. For example:</p>
+ of directives which will apply only to the named directory,
+ the same as <code class="directive"><a href="#directory"><Directory></a></code>.
+ However, it takes as an argument a
+ <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>. For example:</p>
<div class="example"><p><code>
<DirectoryMatch "^/www/(.+/)?[0-9]{3}">
<p>would match directories in <code>/www/</code> that consisted of three
numbers.</p>
+ <div class="note"><h3>Compatability</h3>
+ Prior to 2.3.9, this directive implicitly applied to sub-directories
+ (like <code class="directive"><a href="#directory"><Directory></a></code>) and
+ could not match the end of line symbol ($). In 2.3.9 and later,
+ only directories that match the expression are affected by the enclosed
+ directives.
+ </div>
+
+ <div class="note"><h3>Trailing Slash</h3>
+ This directive applies to requests for directories that may or may
+ not end in a trailing slash, so expressions that are anchored to the
+ end of line ($) must be written with care.
+ </div>
+
<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#directory"><Directory></a></code> for
<usage>
<p><directive type="section">DirectoryMatch</directive> and
<code></DirectoryMatch></code> are used to enclose a group
- of directives which will apply only to the named directory and
- sub-directories of that directory, the same as <directive
- module="core" type="section">Directory</directive>. However, it
- takes as an argument a <glossary ref="regex">regular
- expression</glossary>. For example:</p>
+ of directives which will apply only to the named directory,
+ the same as <directive module="core" type="section">Directory</directive>.
+ However, it takes as an argument a
+ <glossary ref="regex">regular expression</glossary>. For example:</p>
<example>
<DirectoryMatch "^/www/(.+/)?[0-9]{3}">
<p>would match directories in <code>/www/</code> that consisted of three
numbers.</p>
+
+ <note><title>Compatability</title>
+ Prior to 2.3.9, this directive implicitly applied to sub-directories
+ (like <directive module="core" type="section">Directory</directive>) and
+ could not match the end of line symbol ($). In 2.3.9 and later,
+ only directories that match the expression are affected by the enclosed
+ directives.
+ </note>
+
+ <note><title>Trailing Slash</title>
+ This directive applies to requests for directories that may or may
+ not end in a trailing slash, so expressions that are anchored to the
+ end of line ($) must be written with care.
+ </note>
</usage>
<seealso><directive type="section" module="core">Directory</directive> for
a description of how regular expressions are mixed in with normal
continue;
}
- if (ap_regexec(entry_core->r, r->filename, 0, NULL, AP_REG_NOTEOL)) {
+ if (ap_regexec(entry_core->r, r->filename, 0, NULL, 0)) {
continue;
}