]> granicus.if.org Git - apache/commitdiff
Copy the "Note about /" note from the Location
authorRainer Jung <rjung@apache.org>
Tue, 22 Jan 2019 09:27:15 +0000 (09:27 +0000)
committerRainer Jung <rjung@apache.org>
Tue, 22 Jan 2019 09:27:15 +0000 (09:27 +0000)
explanation to the LocationMatch explanation.
Probably more people use LocationMatch than
Location with "~".

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1851790 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/core.xml

index a921cb4717d3b7e259250e4209c075f3c90a1275..a266c8e02ff1bf3403e9fea93a9321eebd8eb8ff 100644 (file)
@@ -3248,6 +3248,28 @@ matching URLs</description>
     Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
 &lt;/LocationMatch&gt;
     </highlight>
+
+    <note><title>Note about / (slash)</title>
+      <p>The slash character has special meaning depending on where in a
+      URL it appears. People may be used to its behavior in the filesystem
+      where multiple adjacent slashes are frequently collapsed to a single
+      slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
+      <code>/home/foo</code>). In URL-space this is not necessarily true.
+      The <directive type="section" module="core">LocationMatch</directive>
+      directive and the regex version of <directive type="section"
+      >Location</directive> require you to explicitly specify multiple
+      slashes if that is your intention.</p>
+
+      <p>For example, <code>&lt;LocationMatch "^/abc"&gt;</code> would match
+      the request URL <code>/abc</code> but not the request URL <code>
+      //abc</code>. The (non-regex) <directive type="section"
+      >Location</directive> directive behaves similarly when used for
+      proxy requests. But when (non-regex) <directive type="section"
+      >Location</directive> is used for non-proxy requests it will
+      implicitly match multiple slashes with a single slash. For example,
+      if you specify <code>&lt;Location "/abc/def"&gt;</code> and the
+      request is to <code>/abc//def</code> then it will match.</p>
+    </note>
 </usage>
 
 <seealso><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;