Apache HTTP Server Version 2.4
This is an index of the directives that are allowed in .htaccess files for
various AllowOverride
settings,
organized by class. Its intended purpose is to help server administrators
verify the privileges they're granting to .htaccess users. For an overview
of how .htaccess works, see the
.htaccess tutorial.
To determine the set of directives that your server configuration allows .htaccess users to use:
AllowOverrideList
for the directory in question. (By default, this is set to
None
.)AllowOverride
setting for the directory in
question. (By default, it is set to None
.) There are two
special cases:
AllowOverride
setting is All
,
add every directive listed on this page to the list.AllowOverride
setting is None
,
you're done. Only the directives in the AllowOverrideList
(if any) will be allowed.AllowOverride
, look up
the corresponding set of directives below and add them to the list.
Several of the override classes are quite powerful and give .htaccess
users a large amount of control over the server. For a stricter approach,
set AllowOverride None
and use
AllowOverrideList
to specify the
exact list of directives that .htaccess users are allowed to use.
The following directives are allowed in any .htaccess file, as long as overrides are enabled in the server configuration.
<Else> | core |
Contains directives that apply only if the condition of a
previous <If> or
<ElseIf> section is not
satisfied by a request at runtime | |
<ElseIf> | core |
Contains directives that apply only if a condition is satisfied
by a request at runtime while the condition of a previous
<If> or
<ElseIf> section is not
satisfied | |
<Files> | core |
Contains directives that apply to matched filenames | |
<FilesMatch> | core |
Contains directives that apply to regular-expression matched filenames | |
<If> | core |
Contains directives that apply only if a condition is satisfied by a request at runtime | |
<IfDefine> | core |
Encloses directives that will be processed only if a test is true at startup | |
<IfDirective> | core |
Encloses directives that are processed conditional on the presence or absence of a specific directive | |
<IfFile> | core |
Encloses directives that will be processed only if file exists at startup | |
<IfModule> | core |
Encloses directives that are processed conditional on the presence or absence of a specific module | |
<IfSection> | core |
Encloses directives that are processed conditional on the presence or absence of a specific section directive | |
<IfVersion> | mod_version |
contains version dependent configuration | |
LimitRequestBody | core |
Restricts the total size of the HTTP request body sent from the client | |
LimitXMLRequestBody | core |
Limits the size of an XML-based request body | |
LogIOTrackTTFB | mod_logio |