Rule file -- format before version 2.0 of software
The Rule File (pre 2.0)
The rule file defines how the server
will translate a request into an
actual filename. It allows one to
provide an extra level of name mapping
above that given by links in the
file system. It allows, for example,
out of date names to mapped onto
their more recent counterparts.
The rule file also allows access
to be restricted. This is essential,
to prevent, for example, unauthorized
access to your password file.
By default, the rule file /etc/httpd.conf
is loaded, unless specified otherwise
with the -R or -r options .
See example rule files .
Each line consists of an operation
code and one or two parameters, referred
to as the template and the result.
Anything on a line after and including
a hash sign (#) is ignored, as are
empty lines.
The server uses the top rule first,
then each successive rule unless
told otehrwise. The operation codes
are as follows
- map template result
- If the address
matches the template, use the result
string from now on for future rules.
- pass template
- If the address maches
the template, use it as it is, porocessing
no further rules.
- fail template
- If the address matches
the template, prohibit access, processing
no futher rules.
The template string may contain at
most one wildcard asterisk ("*").
The result string may have one wildcard
only if the template has one.
When matching,
- Rules are scanned from the top of
the file to the bottom.
- If a request matches a "map" template
exactly, the result string is used
from then on.
- If the request maches a "map" template
with wildcard, then the text of the
request which matches the wildcard
is inserted in place of the wildcard
in the result string to form the
translated request. If the result
string has no wildcard, it is used
as it is.
- When a substitution takes place,
the rule scan continues with the
next rule using the new string in
place of the request.
Tim BL