(1). Htaccess mainly defines some rules that are used to translate PHP into HTML pseudo-static rules. This file only has a suffix without a filename. The method of creation is:
--First create a TXT file and open it.
-Save As. Storage format Select all file types, and then enter the. htaccess at the file name.
(2) Our server's main configuration file is httpd.conf, there are also many configurations, such as the server root directory (Apache installation path), the document root directory (www exists path), as well as the following:
DocumentRoot "E:\WWW" <directory/> Options +indexes +followsymlinks +execcgi allowoverride All Order Allow,deny Require All granted</directory>
--options, is to set some features of the directory, directory ... The amount of ... Can be understood as a path. Sometimes the file that is accessed does not exist, and the server returns the list of files in the directory to us. To prohibit this, you only need to remove the indexes attribute of the options. Other more detailed reference: Apache options Instructions
--allowoverride, meaning to be covered. The configuration file in other places overrides the Master profile. The default is all allow. So if we have a. htaccess, the main configuration file will be overwritten.
--allow and deny are the ones that allow or disallow which IP address to access, or the entire IP side of the screen.
-then order is a sequence that prescribes allow and deny in effect.
--require, that is, how to request, here are authorized permission. There are also Require all denied, Require host xxx.com, Require IP 192.168.1 192.168.2, Require local, etc. If set to require local, it can only be accessed locally, and others are inaccessible from elsewhere.
How do I create a file with no file name? That is, how to create a. htaccess and server configuration file snooping