From 3fd92531ff3e011919ecfbd6eb64e5698c61cc97 Mon Sep 17 00:00:00 2001 From: dgaudet Date: Wed, 6 Aug 1997 20:21:16 +0000 Subject: [PATCH] directory_walk optimization reducing the core loop from O(N*M) to O(N+M). Plus minor semantic changes. Plus BSD fnmatch.[ch]. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@78908 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/core.html | 44 ++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/docs/manual/mod/core.html b/docs/manual/mod/core.html index 71d81808f9..b298354094 100644 --- a/docs/manual/mod/core.html +++ b/docs/manual/mod/core.html @@ -309,7 +309,11 @@ directives which will apply only to the named directory and sub-directories of that directory. Any directive which is allowed in a directory context may be used. Directory is either the full path to a directory, or a wild-card string. In a wild-card string, `?' matches any single character, -and `*' matches any sequences of characters. Example: +and `*' matches any sequences of characters. As of Apache 1.3, you +may also use `[]' character ranges like in the shell. Also as of Apache 1.3 +none of the wildcards match a `/' character, which more closely mimics the +behaviour of Unix shells. +Example:
    <Directory /usr/local/httpd/htdocs>
    Options Indexes FollowSymLinks
@@ -324,11 +328,10 @@ Extended regular expressions can also be used, with the addition of the
    <Directory ~ "^/www/.*/[0-9]{3}">
 
-would match directories in /www/ that consisted of three numbers. In -Apache 1.3 and later, it is reccomended to use -<DirectoryMatch> instead.

+would match directories in /www/ that consisted of three numbers.

-

If multiple directory sections match the directory (or its parents) containing +

If multiple (non-regular expression) directory sections match the +directory (or its parents) containing a document, then the directives are applied in the order of shortest match first, interspersed with the directives from the .htaccess files. For example, with @@ -350,6 +353,33 @@ steps are:

+Regular expression directory sections are handled slightly differently +by Apache 1.2 and 1.3. In Apache 1.2 they are interspersed with the normal +directory sections and applied in the order they appear in the configuration +file. They are applied only once, and apply when the shortest match +possible occurs. In Apache 1.3 regular expressions are not considered +until after all of the normal sections have been applied. Then all of +the regular expressions are tested in the order they appeared in the +configuration file. For example, with +

+<Directory ~ abc$>
+... directives here ...
+</Directory>
+
+Suppose that the filename being accessed is +/home/abc/public_html/abc/index.html. The server +considers each of /, /home, /home/abc, +/home/abc/public_html, and /home/abc/public_html/abc +in that order. In Apache 1.2, when +/home/abc is considered, the regular expression will match +and be applied. In Apache 1.3 the regular expression isn't considered +at all at that point in the tree. It won't be considered until after +all normal <Directory>s and .htaccess files have +been applied. Then the regular expression will +match on /home/abc/public_html/abc and be applied. + +

+ Note that the default Apache access for <Directory /> is Allow from All. This means that Apache will serve any file @@ -396,6 +426,10 @@ argument a regular expression. For example:

would match directories in /www/ that consisted of three numbers.

+

See Also: +<Directory> for a description of how +regular expressions are mixed in with normal <Directory>s.

+

DocumentRoot directive

-- 2.40.0