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.