]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1040808 from trunk:
authorEric Covener <covener@apache.org>
Tue, 30 Nov 2010 22:10:27 +0000 (22:10 +0000)
committerEric Covener <covener@apache.org>
Tue, 30 Nov 2010 22:10:27 +0000 (22:10 +0000)
PR50375: <Location> has bad example in sections.xml and never actually explains what's matched
in core.xml.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1040809 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/core.xml
docs/manual/sections.xml

index 2cfcf2bc7dee531abb20fa1f20080181a4fefa0d..af4eb36cb6cc4387a0be3022784152f85478553e 100644 (file)
@@ -1134,7 +1134,7 @@ in case of an error</description>
     anyone other than the user that starts the server.</p>
     <note type="warning"><title>Note</title>
       <p>When entering a file path on non-Unix platforms, care should be taken
-      to make sure that only forward slashed are used even though the platform
+      to make sure that only forward slashes are used even though the platform
       may allow the use of back slashes. In general it is a good idea to always 
       use forward slashes throughout the configuration files.</p>
     </note>
@@ -1999,6 +1999,34 @@ URLs</description>
     locations.  Since several different URLs may map to the same
     filesystem location, such access controls may by circumvented.</p>
 
+    <p>The enclosed directives will be applied to the request if the path component
+    of the URL meets <em>any</em> of the following criteria:
+    <ul>
+      <li>The specified location matches exactly the path component of the URL.
+      </li>
+      <li>The specified location, which ends in a forward slash, is a prefix 
+      of the path component of the URL (treated as a context root).
+      </li>
+      <li>The specified location, with the addition of a trailing slash, is a 
+      prefix of the path component of the URL (also treated as a context root).
+      </li>
+    </ul>
+    In the example below, where no trailing slash is used, requests to 
+    /private1, /private1/ and /private1/file.txt will have the enclosed
+    directives applied, but /private1other would not. 
+    <example>
+      &lt;Location /private1&gt;
+          ...
+    </example>
+    In the example below, where a trailing slash is used, requests to 
+    /private2/ and /private2/file.txt will have the enclosed
+    directives applied, but /private2 and /private2other would not. 
+    <example>
+      &lt;Location /private2<em>/</em>&gt;
+          ...
+    </example>
+    </p>
+
     <note><title>When to use <directive 
     type="section">Location</directive></title>
 
index fcaea3a2ac253e3da1bda2ff0989f9ea9523a02e..596481623396eb4fa287ce9ed1f6b2ac639a119c 100644 (file)
@@ -216,7 +216,7 @@ In particular, it will apply to requests for
 as any other requests starting with the <code>/private</code> string.</p>
 
 <example>
-&lt;Location /private&gt;<br />
+&lt;LocationMatch ^/private&gt;<br />
 Order Allow,Deny<br />
 Deny from all<br />
 &lt;/Location&gt;