From fc7588cfa5d13a7e2b0a52e02f884b4a21f167d2 Mon Sep 17 00:00:00 2001 From: Alexei Kosut Date: Thu, 28 Nov 1996 08:08:19 +0000 Subject: [PATCH] Update Directory/Location/Files docs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77084 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/core.html | 88 +++++++++++++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 17 deletions(-) diff --git a/docs/manual/mod/core.html b/docs/manual/mod/core.html index 6d8af1fea2..6819df7c44 100644 --- a/docs/manual/mod/core.html +++ b/docs/manual/mod/core.html @@ -77,12 +77,43 @@ fast pipes)


<Files>

-Syntax: <Files regexp>
-Context: server config, virtualhost, directory
-Status: Core.

+Syntax: <Files filename> +... </Files>
+Context: server config, virtual host, htaccess
+Status: core
+Compatibility: only available in Apache +1.2 and above.

+ +

The <Files> directive provides for access control by +filename. It is comparable to the <Directory> directive and +<Location> directives. It +should be matched with a </Files> directive. Directives that +apply to the filename given should be listed +within. <Files> sections are processed in the +order they appear in the configuration file, after the +<Directory> sections and .htaccess files are +read, but before <Location> sections.

-The File container applies the directives within to files -which match the regexp. +

The filename argument should include a filename, or a +wildcard string, where `?' matches any single character, and `*' matches any +sequences of characters. Extended regular expressions can also be used, with the addition of +the ~ character. For example:

+ +
+   <Files ~ "\.(gif|jpe?g|png)$">
+
+ +would match most common Internet graphics formats. + +

Note that unlike <Directory> and <Location> sections, +<Files> sections can be used inside .htaccess +files. This allows users to control access to their own files, at a +file-by-file level. When used in an .htaccess file, if the +filename does not begin with a / character, +the directory being applied will be prefixed automatically.


@@ -303,8 +334,7 @@ with filenames missing the .gif extension.


<Directory> directive

-Syntax: <Directory directory> ... -</Directory>
+Syntax: <Directory directory> ... </Directory>
Context: server config, virtual host
Status: Core.

@@ -314,12 +344,23 @@ 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 wildcard string. In a wildcard string, `?' matches any single character, and `*' matches any sequences of characters. Example: -

- -<Directory /usr/local/httpd/htdocs>
-Options Indexes FollowSymLinks
-</Directory>
-If multiple directory sections match the directory (or its parents) containing +
+   <Directory /usr/local/httpd/htdocs>
+   Options Indexes FollowSymLinks
+   </Directory>
+
+ +

Apache 1.2 and above: +Extended regular expressions can also be used, with the addition of the +~ character. For example:

+ +
+   <Directory ~ "^/www/.*/[0-9]{3}">
+
+ +would match directories in /www/ that consisted of three numbers.

+ +

If multiple 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 @@ -530,7 +571,8 @@ then it applies to all access methods.


<Location>

-Syntax: <Location URL prefix>
+Syntax: <Location URL> +... </Location>
Context: server config, virtual host
Status: core
Compatibility: Location is only available in Apache @@ -554,9 +596,21 @@ file, or a number of files), and can include wildcards. In a wildcard string, `?' matches any single character, and `*' matches any sequences of characters. -

This functionality is especially useful when combined with the -SetHandler -directive. For example, to enable status requests, but allow them only +

Apache 1.2 and above: +Extended regular expressions can also be used, with the addition of +the +~ character. For example:

+ +
+   <Location ~ "/(extra|special)/data">
+
+ +would match URLs that contained the substring "/extra/data" or +"/special/data".

+ +

The Location functionality is especially useful when +combined with the SetHandler directive. For example, to enable status requests, but allow them only from browsers at foo.com, you might use:

-- 
2.40.0