AllowOverride

最後更新: 2015-06-18

 

目錄

  • AllowOverride
  • AllowOverrideList

AllowOverride

 

Types of directives that are allowed in .htaccess files

Context:  directory

directive-type:

  • All
  • None
  • AuthConfig (AuthUserFile, Require ..)
  • FileInfo ( document types, document meta data, mod_rewrite,  mod_alias, mod_actions)
  • Indexes ( DirectoryIndex )
  • Limit (Allow, Deny and Order)
  • Options (comma list (but no spaces))

Example:

<Directory /var/www/html>
    AllowOverride AuthConfig Indexes
</Directory>

 


AllowOverrideList

 

Individual directives that are allowed in .htaccess files

Example:

# In the example above only the Redirect and RedirectMatch directives are allowed.

AllowOverride None
AllowOverrideList Redirect RedirectMatch

 


Override require valid user in .htaccess

 

在 .htaccess 加入         # 用 satisfy 實現

Allow from all
satisfy any