Apache's allowoverride parameters

Source: Internet
Author: User

  Apache's allowoverride parameters

  When using Apache's rewrite module to rewrite URLs, the 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.:

1 <  />2allowoverride None3<  /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:

1 <  /myblogroot/>2allowoverride FileInfo3<  /directory>

For URL rewrite, at a minimum, you need to set the directory to:

allow only in <Directory> configuration segments

allowoverride is only valid in <Directory> configuration segments that do not contain regular expressions. In <location>, <directorymatch>, <Files> is not valid in the configuration section.

If this directive is set to none, then the. htaccess file will be completely ignored. In fact, the server does not read the. htaccess file at all.

Parameters of the 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's allowoverride parameters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.