AllowOverride literally explains the meaning of allowing overrides, that Apache allows another configuration file to overwrite an existing one.
We usually use Apache's rewrite module to rewrite URLs, and rewrite rules are written in the. htaccess file. However, to enable Apache to read the contents of the. htaccess file properly, you must configure the directory where the. htaccess is located.
From security considerations, the AllowOverride property of the root directory is generally configured to disallow any override, i.e.:
< Directory/> AllowOverride None </directory>
When AllowOverride is set to None, the. htaccess file is completely ignored. When this directive is set to all, any directives with the ". htaccess" Scope are allowed to appear in the. htaccess file.
For URL rewrite, at a minimum, you need to set the directory to:
< directory/myblogroot/> allowoverride FileInfo </directory>
The following are the detailed parameters of allowoverride:
Authconfig
Allows the use of instructions related to certification authorizations (Authdbmgroupfile, Authdbmuserfile, AuthGroupFile, AuthName, AuthType, AuthUserFile, Require, etc.).
FileInfo
Directives that allow the use of control document types (DefaultType, ErrorDocument, Forcetype, languagepriority, SetHandler, Setinputfilter, Setoutputfilter, Add* and remove* directives in mod_mime, etc.), instructions for controlling document metadata (Header, Requestheader, Setenvif, Setenvifnocase, Browsermatch, Cookieexpires , Cookiedomain, Cookiestyle, cookietracking, cookiename), mod_rewrite directives (Rewriteengine, rewriteoptions, RewriteBase, Rewritecond, Rewriterule), and the action directive in mod_actions.
Indexes
Allows the use of commands that control the index of the directory (Adddescription, AddIcon, addiconbyencoding, Addiconbytype, DefaultIcon, DirectoryIndex, FancyIndexing, Headername, Indexignore, indexoptions, Readmename, etc.).
Limit
Allows the use of commands that control host access (Allow, Deny, Order).
Options[=option,...]
Allows the use of commands (options and Xbithack) that control the functionality of the specified directory. You can append a comma-delimited list of options (no spaces) after the equals sign to control which options are allowed for the option directive.
Apache httpd.conf configuration file allowoverride parameter details