-.Htaccess file (" or " distributed configuration file; provides a method for changing the configuration directory, that is, placing a contains one or more instruction files in a specific document directory to work on this directory and all subdirectories. Commands that can be used as users are limited. Administrators can set them via the AllowOverride command of Apache.
The instructions in the
subdirectory override the instructions in the more advanced directory or the master server configuration file.
-.Htaccess must be uploaded in ASCII mode, preferably set to 644.
Location of the
common client request error return code:
401, Authorization, Required
404, Not, Found
405, Method, Not, Allowed
408, Request, Timed, Out
411, Content, Length, Required
412, Precondition, Failed
413, Request, Entity, Too, Long
414, Request, URI, Too, Long
415, Unsupported, Media, Type
common server error return code:
500, Internal, Server, Error
users can use.Htaccess to specify their previously made error alert pages. In general, people can set up a directory specifically, such as errors, where these pages are placed. Then add the following instructions in.Htaccess:
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/internalerror.html
one line of instructions. The first instruction above means that for the 404, that is, when you do not find the document you need, you have to display the page as the notfound.html page under the /errors directory. It is not difficult to see that the syntax is