Apache. htaccess File Usage Manual

Source: Internet
Author: User
Tags config manual valid

The. htaccess file provides a way to change the configuration for a directory.

*. htaccess file

* Working principle and use method

* Use of. htaccess files

* The effective of the instruction

* Examples of Certification

* Server side contains examples

* CGI Examples

* Troubleshoot

. htaccess file

Related Modules related instructions

* Core

* Mod_auth

* mod_cgi

* Mod_include

* Mod_mime

* Accessfilename

* allowoverride

* Options

* AddHandler

* SetHandler

* AuthType

* AuthName

* AuthUserFile

* AuthGroupFile

* Require

Top

Working principle and use method

The. htaccess file (or distributed configuration file) provides a way to configure changes to the directory, that is, to place a file containing one or more directives in a specific document directory to function in this directory and all its subdirectories.

Note: If you need to use a filename other than. htaccess, you can use the Accessfilename directive to change it. For example, if you need to use. config, you can configure it in the server configuration file in the following ways:

Accessfilename. config

The instructions that are allowed to be placed in these files depend on the allowoverride instruction, which is determined by category. Which instructions in the htaccess file are valid. If an instruction is allowed to be placed in a. htaccess file, in the description of this manual, this directive will have an overlay that describes the value that must be set in the allowoverride directive for this instruction to take effect.

For example, the instructions in this manual for the Adddefaultcharset directive indicate that this directive can be used with the. htaccess file (see the context Line), while the override row is "FileInfo", So in order to make this directive valid in. htaccess, you must set at least "allowoverride FileInfo".

Example:

Context:server config, virtual host, directory,. htaccess

Override:fileinfo

If you are unsure whether a particular directive is allowed for a. htaccess file, you can refer to the instructions in the manual to see if there is a ". htaccess." In the context ("contextual") line.

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.