AllowOverride
This directive tells Apache which directives in an .htaccess file can override earlier directives.
AllowOverride override1 override2
...
Directory
The list of
AllowOverride
overrides is as follows:
-
AuthConfig
Allows individual settings of
AuthDBMGroupFile
,AuthDBMUserFile
,AuthGroupFile
,AuthName
,AuthType
,AuthUserFile
, andrequire
-
FileInfo
Allows
AddType
,AddEncoding
,AddLanguage
,AddCharset
,AddHandler
,RemoveHandler
,LanguagePriority
,ErrorDocument
,DefaultType
,Action, Redirect
,RedirectMatch
,RedirectTemp
,RedirectPermanent
,PassEnv
,SetEnv
,UnsetEnv
,Header
,RewriteEnging
,RewriteOptions
,RewriteBase
,RewriteCond
,RewriteRule
,CookieTracking
, andCookiename
-
Indexes
Allows
FancyIndexing
,AddIcon
,AddDescription
(see Chapter 7)-
Limit
Can limit access based on hostname or IP number
-
Options
Allows the use of the
Options
directive (see Chapter 13)-
All
All of the previous
-
None
None of the previous
You might ask: if none
switches multiple searches
off, which of these options switches it on? The answer is any of
them, or the complete absence of AllowOverride
. In
other words, it is on by default.
To illustrate how this works, look at
.../site.htaccess/httpd3.conf, which is
httpd2.conf with the authentication directives
on the salespeople’s directory back in
again. The Config filewants cleaners
; the
.
myaccess file wants
directors
. If we now put the authorization
directives, favoring cleaners
, back into the
Config file:
User webuser Group webgroup ServerName www.butterthlies.com ...
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.