From: Rainer Jung Date: Tue, 22 Jan 2019 09:27:15 +0000 (+0000) Subject: Copy the "Note about /" note from the Location X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8250e1bea34a0582e3fd8010e7211813aa4a691d;p=apache Copy the "Note about /" note from the Location 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 --- diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index a921cb4717..a266c8e02f 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -3248,6 +3248,28 @@ matching URLs Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example </LocationMatch> + + Note about / (slash) +

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 (i.e., /home///foo is the same as + /home/foo). In URL-space this is not necessarily true. + The LocationMatch + directive and the regex version of Location require you to explicitly specify multiple + slashes if that is your intention.

+ +

For example, <LocationMatch "^/abc"> would match + the request URL /abc but not the request URL + //abc. The (non-regex) Location directive behaves similarly when used for + proxy requests. But when (non-regex) Location is used for non-proxy requests it will + implicitly match multiple slashes with a single slash. For example, + if you specify <Location "/abc/def"> and the + request is to /abc//def then it will match.

+
How <Directory>, <Location>