Apache HTTP Server Version 2.4
Available Languages: en
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 |
Enable tracking of time to first byte (TTFB) | |
LuaCodeCache | mod_lua |
Configure the compiled code cache. | |
LuaHookAccessChecker | mod_lua |
Provide a hook for the access_checker phase of request processing | |
LuaHookAuthChecker | mod_lua |
Provide a hook for the auth_checker phase of request processing | |
LuaHookCheckUserID | mod_lua |
Provide a hook for the check_user_id phase of request processing | |
LuaHookFixups | mod_lua |
Provide a hook for the fixups phase of a request processing | |
LuaHookInsertFilter | mod_lua |
Provide a hook for the insert_filter phase of request processing | |
LuaHookLog | mod_lua |
Provide a hook for the access log phase of a request processing | |
LuaHookMapToStorage | mod_lua |
Provide a hook for the map_to_storage phase of request processing | |
LuaHookTranslateName | mod_lua |
Provide a hook for the translate name phase of request processing | |
LuaHookTypeChecker | mod_lua |
Provide a hook for the type_checker phase of request processing | |
LuaInherit | mod_lua |
Controls how parent configuration sections are merged into children | |
LuaMapHandler | mod_lua |
Map a path to a lua handler | |
LuaPackageCPath | mod_lua |
Add a directory to lua's package.cpath | |
LuaPackagePath | mod_lua |
Add a directory to lua's package.path | |
LuaQuickHandler | mod_lua |
Provide a hook for the quick handler of request processing | |
LuaRoot | mod_lua |
Specify the base path for resolving relative paths for mod_lua directives | |
LuaScope | mod_lua |
One of once, request, conn, thread -- default is once | |
RLimitCPU | core |
Limits the CPU consumption of processes launched by Apache httpd children | |
RLimitMEM | core |
Limits the memory consumption of processes launched by Apache httpd children | |
RLimitNPROC | core |
Limits the number of processes that can be launched by processes launched by Apache httpd children | |
ServerSignature | core |
Configures the footer on server-generated documents | |
SSIErrorMsg | mod_include |
Error message displayed when there is an SSI error | |
SSITimeFormat | mod_include |
Configures the format in which date strings are displayed | |
SSIUndefinedEcho | mod_include |
String displayed when an unset variable is echoed |
The following directives are allowed in .htaccess files when
AllowOverride AuthConfig
is in effect. They give .htaccess
users control over the authentication and authorization methods that are
applied to their directory subtrees, including several related utility
directives for session handling and TLS settings.
Anonymous | mod_authn_anon |
Specifies userIDs that are allowed access without password verification | |
Anonymous_LogEmail | mod_authn_anon |
Sets whether the password entered will be logged in the error log | |
Anonymous_MustGiveEmail | mod_authn_anon |
Specifies whether blank passwords are allowed | |
Anonymous_NoUserID | mod_authn_anon |
Sets whether the userID field may be empty | |
Anonymous_VerifyEmail | mod_authn_anon |
Sets whether to check the password field for a correctly formatted email address | |
AuthBasicAuthoritative | mod_auth_basic |
Sets whether authorization and authentication are passed to lower level modules | |
AuthBasicFake | mod_auth_basic |
Fake basic authentication using the given expressions for username and password | |
AuthBasicProvider | mod_auth_basic |
Sets the authentication provider(s) for this location | |
AuthBasicUseDigestAlgorithm | mod_auth_basic |
Check passwords against the authentication providers as if Digest Authentication was in force instead of Basic Authentication. | |
AuthDBMGroupFile | mod_authz_dbm |
Sets the name of the database file containing the list of user groups for authorization | |
AuthDBMType | mod_authn_dbm |
Sets the type of database file that is used to store passwords | |
AuthDBMUserFile | mod_authn_dbm |
Sets the name of a database file containing the list of users and passwords for authentication | |
AuthDigestAlgorithm | mod_auth_digest |
Selects the algorithm used to calculate the challenge and response hashes in digest authentication | |
AuthDigestDomain | mod_auth_digest |
URIs that are in the same protection space for digest authentication | |
AuthDigestNonceLifetime | mod_auth_digest |
How long the server nonce is valid | |
AuthDigestProvider | mod_auth_digest |
Sets the authentication provider(s) for this location | |
AuthDigestQop | mod_auth_digest |
Determines the quality-of-protection to use in digest authentication | |
AuthFormAuthoritative | mod_auth_form |
Sets whether authorization and authentication are passed to lower level modules | |
AuthFormProvider | mod_auth_form |
Sets the authentication provider(s) for this location | |
AuthGroupFile | mod_authz_groupfile |
Sets the name of a text file containing the list of user groups for authorization | |
AuthLDAPAuthorizePrefix | mod_authnz_ldap |
Specifies the prefix for environment variables set during authorization | |
AuthLDAPBindAuthoritative | mod_authnz_ldap |
Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials. | |
AuthLDAPBindDN | mod_authnz_ldap |
Optional DN to use in binding to the LDAP server | |
AuthLDAPBindPassword | mod_authnz_ldap |
Password used in conjunction with the bind DN | |
AuthLDAPCompareAsUser | mod_authnz_ldap |
Use the authenticated user's credentials to perform authorization comparisons | |
AuthLDAPCompareDNOnServer | mod_authnz_ldap |
Use the LDAP server to compare the DNs | |
AuthLDAPDereferenceAliases | mod_authnz_ldap |
When will the module de-reference aliases | |
AuthLDAPGroupAttribute | mod_authnz_ldap |
LDAP attributes used to identify the user members of groups. | |
AuthLDAPGroupAttributeIsDN | mod_authnz_ldap |
Use the DN of the client username when checking for group membership | |
AuthLDAPInitialBindAsUser | mod_authnz_ldap |
Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server | |
AuthLDAPInitialBindPattern | mod_authnz_ldap |
Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup | |
AuthLDAPMaxSubGroupDepth | mod_authnz_ldap |
Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued. | |
AuthLDAPRemoteUserAttribute | mod_authnz_ldap |
Use the value of the attribute returned during the user query to set the REMOTE_USER environment variable | |
AuthLDAPRemoteUserIsDN | mod_authnz_ldap |
Use the DN of the client username to set the REMOTE_USER environment variable | |
AuthLDAPSearchAsUser | mod_authnz_ldap |
Use the authenticated user's credentials to perform authorization searches | |
AuthLDAPSubGroupAttribute | mod_authnz_ldap |
Specifies the attribute labels, one value per directive line, used to distinguish the members of the current group that are groups. | |
AuthLDAPSubGroupClass | mod_authnz_ldap |
Specifies which LDAP objectClass values identify directory objects that are groups during sub-group processing. | |
AuthLDAPUrl | mod_authnz_ldap |
URL specifying the LDAP search parameters | |
AuthMerging | mod_authz_core |
Controls the manner in which each configuration section's authorization logic is combined with that of preceding configuration sections. | |
AuthName | mod_authn_core |
Authorization realm for use in HTTP authentication | |
AuthnCacheProvideFor | mod_authn_socache |
Specify which authn provider(s) to cache for | |
AuthnCacheTimeout | mod_authn_socache |
Set a timeout for cache entries | |
AuthType | mod_authn_core |
Type of user authentication | |
AuthUserFile | mod_authn_file |
Sets the name of a text file containing the list of users and passwords for authentication | |
AuthzDBMType | mod_authz_dbm |
Sets the type of database file that is used to store list of user groups | |
CGIPassAuth | core |
Enables passing HTTP authorization headers to scripts as CGI variables | |
LDAPReferralHopLimit | mod_ldap |
The maximum number of referral hops to chase before terminating an LDAP query. | |
LDAPReferrals | mod_ldap |
Enable referral chasing during queries to the LDAP server. | |
<Limit> | core |
Restrict enclosed access controls to only certain HTTP methods | |
<LimitExcept> | core |
Restrict access controls to all HTTP methods except the named ones | |
Require | mod_authz_core |
Tests whether an authenticated user is authorized by an authorization provider. | |
<RequireAll> | mod_authz_core |
Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed. | |
<RequireAny> | mod_authz_core |
Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed. | |
<RequireNone> | mod_authz_core |
Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail. | |
Satisfy | mod_access_compat |
Interaction between host-level access control and user authentication | |
Session | mod_session |
Enables a session for the current directory or location | |
SessionEnv | mod_session |
Control whether the contents of the session are written to the HTTP_SESSION environment variable | |
SessionHeader | mod_session |
Import session updates from a given HTTP response header | |
SessionInclude | mod_session |
Define URL prefixes for which a session is valid | |
SessionMaxAge | mod_session |
Define a maximum age in seconds for a session | |
SSLCipherSuite | mod_ssl |
Cipher Suite available for negotiation in SSL handshake | |
SSLRenegBufferSize | mod_ssl |
Set the size for the SSL renegotiation buffer | |
SSLRequire | mod_ssl |
Allow access only when an arbitrarily complex boolean expression is true | |
SSLRequireSSL | mod_ssl |
Deny access when SSL is not used for the HTTP request | |
SSLUserName | mod_ssl |
Variable name to determine user name | |
SSLVerifyClient | mod_ssl |
Type of Client Certificate verification | |
SSLVerifyDepth | mod_ssl |
Maximum depth of CA Certificates in Client Certificate verification |
The following directives are allowed in .htaccess files when
AllowOverride FileInfo
is in effect. They give .htaccess
users a wide range of control over the responses and metadata given by the
server.
AcceptPathInfo | core |
Resources accept trailing pathname information | |
Action | mod_actions |
Activates a CGI script for a particular handler or content-type | |
AddCharset | mod_mime |
Maps the given filename extensions to the specified content charset | |
AddDefaultCharset | core |
Default charset parameter to be added when a response
content-type is text/plain or text/html | |
AddEncoding | mod_mime |
Maps the given filename extensions to the specified encoding type | |
AddHandler | mod_mime |
Maps the filename extensions to the specified handler | |
AddInputFilter | mod_mime |
Maps filename extensions to the filters that will process client requests | |
AddLanguage | mod_mime |
Maps the given filename extension to the specified content language | |
AddOutputFilter | mod_mime |
Maps filename extensions to the filters that will process responses from the server | |
AddOutputFilterByType | mod_filter |
assigns an output filter to a particular media-type | |
AddType | mod_mime |
Maps the given filename extensions onto the specified content type | |
BrowserMatch | mod_setenvif |
Sets environment variables conditional on HTTP User-Agent | |
BrowserMatchNoCase | mod_setenvif |
Sets environment variables conditional on User-Agent without respect to case | |
CGIMapExtension | core |
Technique for locating the interpreter for CGI scripts | |
CGIVar | core |
Controls how some CGI variables are set | |
CharsetDefault | mod_charset_lite |
Charset to translate into | |
CharsetOptions | mod_charset_lite |
Configures charset translation behavior | |
CharsetSourceEnc | mod_charset_lite |
Source charset of files | |
CookieDomain | mod_usertrack |
The domain to which the tracking cookie applies | |
CookieExpires | mod_usertrack |
Expiry time for the tracking cookie | |
CookieName | mod_usertrack |
Name of the tracking cookie | |
CookieStyle | mod_usertrack |
Format of the cookie header field | |
CookieTracking | mod_usertrack |
Enables tracking cookie | |
DefaultLanguage | mod_mime |
Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means. | |
DefaultType | core |
This directive has no effect other than to emit warnings
if the value is not none . In prior versions, DefaultType
would specify a default |