From: Alexei Kosut
+would match directories in /www/ that consisted of three numbers. In
+Apache 1.3 and later, it is reccomended to use
+<DirectoryMatch> instead.
If multiple directory sections match the directory (or its parents) containing
a document, then the directives are applied in the order of shortest match
@@ -357,6 +362,26 @@ may appear in any configuration file. <Directory> directives cannot
nest, and cannot appear in a <Limit> section.
<DirectoryMatch> and </DirectoryMatch> are used to enclose a group of
+directives which will apply only to the named directory and sub-directories
+of that directory, the same as <Directory>. However, it takes as an
+argument a regular expression. For example: would match directories in /www/ that consisted of three numbers.
+<DirectoryMatch>
+Syntax: <DirectoryMatch regex> ... </DirectoryMatch>
+Context: server config, virtual host
+Status: Core.
+Compatibility: Available in Apache 1.3 and later
+
+
+ <DirectoryMatch "^/www/.*/[0-9]{3}">
+
+
+
+
DocumentRoot directive
Syntax: DocumentRoot directory-filename
@@ -478,7 +503,9 @@ the ~
character. For example:
Note that unlike
+
+ The <FilesMatch> directive provides for access control by
+filename, just as the <Files> directive
+does. However, it accepts a regular expression. For example: would match most common Internet graphics formats. would match URLs that contained the substring "/extra/data" or
-"/special/data".<Directory>
and
+<FilesMatch>
+Syntax: <FilesMatch regex>
+... </Files>
+Context: server config, virtual host, htaccess
+Status: core
+Compatibility: only available in Apache
+1.3 and above.
+ <FilesMatch "\.(gif|jpe?g|png)$">
+
+
+
+
Group directive
Syntax: Group unix-group
@@ -732,7 +779,8 @@ the
The
+
+ The <LocationMatch> directive provides for access control by
+URL, in an identical manner to <Location>. However, it takes a regular
+expression as an argument instead of a simple string. For example: would match URLs that contained the substring "/extra/data" or
+"/special/data".Location
functionality is especially useful when
combined with the
+<LocationMatch>
+
+Syntax: <LocationMatch regex>
+... </LocationMatch>
+Context: server config, virtual host
+Status: core
+Compatibility: Location is only available in Apache
+1.3 and later.
+ <LocationMatch "/(extra|special)/data">
+
+
+
+
LockFile directive
Syntax: LockFile filename
Default: LockFile logs/accept.lock
diff --git a/docs/manual/mod/directives.html b/docs/manual/mod/directives.html
index d65e0056147..3667159927c 100644
--- a/docs/manual/mod/directives.html
+++ b/docs/manual/mod/directives.html
@@ -33,6 +33,7 @@
Directives
@@ -64,6 +67,28 @@ See also ScriptAlias.
+Syntax: AliasMatch regex directory-filename
+Context: server config, virtual host
+Status: Base
+Module: mod_alias
+Compatibility: Available in Apache 1.3 and later
+
This directive is equivilent to Alias, but
+makes use of standard regular expressions, instead of simple prefix
+matching. The supplied regular expression is matched against the URL,
+and if it matches, the server will substitute any parenthesized
+matches into the given string and use it as a filename. For example,
+to activate the /icons
directory, one might use:
+
+ AliasMatch ^/icons(.*) /usr/local/etc/httpd/icons$1 ++ + +
@@ -128,6 +153,29 @@ the function send_error_response
in http_protocol.c).
+Syntax: RedirectMatch [status regex url
+Context: server config, virtual host
+Status: Base
+Module: mod_alias
+Compatibility: Available in Apache 1.3 and later
+
This directive is equivilent to Redirect, but +makes use of standard regular expressions, instead of simple prefix +matching. The supplied regular expression is matched against the URL, +and if it matches, the server will substitute any parenthesized +matches into the given string and use it as a filename. For example, +to redirect all GIF files to like-named JPEG files on another server, +one might use: +
+ RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg ++ + +
@@ -182,6 +230,28 @@ A request for http://myserver/cgi-bin/foo would cause the server to run the script /web/cgi-bin/foo.
+
+Syntax: ScriptAliasMatch regex directory-filename
+Context: server config, virtual host
+Status: Base
+Module: mod_alias
+Compatibility: Available in Apache 1.3 and later
+
This directive is equivilent to ScriptAlias, but
+makes use of standard regular expressions, instead of simple prefix
+matching. The supplied regular expression is matched against the URL,
+and if it matches, the server will substitute any parenthesized
+matches into the given string and use it as a filename. For example,
+to activate the standard /cgi-bin
, one might use:
+
+ ScriptAlias ^/cgi-bin(.*) /usr/local/etc/httpd/cgi-bin$1 ++ +