The AllowOverride parameter indicates whether the Apache server is located. the htacess file is used as the configuration file. If it is set to none, the server will ignore it. if the htacess file is set to All, All. all commands in the htaccess file will be overwritten. For AllowOverride, you can also specify the following types of commands that can be overwritten.
Generally, when the Apache rewrite module is used to rewrite the URL, the rewrite rule will be written in the. htaccess file. To enable apache to normally read the content of the. htaccess file, you must configure the directory where. htaccess is located. For security, the AllowOverride attribute of the root directory is generally configured to not allow any Override, that is
Copy codeThe Code is as follows: <Directory/>
AllowOverride None
</Directory>
When AllowOverride is set to None, the. htaccess file is completely ignored. When this command is set to All, All commands with ". htaccess" scope can appear in the. htaccess file.
For URL rewrite, at least the directory must be set
Copy codeThe Code is as follows: <Directory/myblogroot/>
AllowOverride FileInfo
</Directory>
2. Enable Options FollowSymLinks and AllowOverride All in the directory that supports url rewirte
Copy codeThe Code is as follows: Alias/php "c:/web/php /"
<Directory "c:/web/php/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow, deny
Allow from all
</Directory>
By using http: // localhost: 8080/php/, the/php/and its subdirectories support url rewrite.
1 AuthConfig allows all permission commands, including AuthDBMGroupFile AuthDBMUserFile AuthGroupFile AuthName AuthTypeAuthUserFile and Require
2 FileInfo allows commands of the file control type. They include AddEncoding AddLanguage AddType DEfaultType ErrorDocument extends agepriority
3. Indexes allows commands of the Directory control type. They include AddDescription AddIcon AddIconByEncoding AddIconByType DefaultIcon DirectoryIndex FancyIndexing HeaderName IndexIgnore IndexOptions ReadmeName
4. Limit allows you to use permission control commands. They include Allow Deny and Order
5 Options allows you to use commands that control directory features. They include Options and XBitHack.
Options
1 All allow All of the following functions except MultiViews
2. MultiViews allows multiple remote views. If your directory contains a file named foo.txt, you can use/foo to access it. This is useful for websites with multiple languages.
3 Indexes if no index file exists in this directory, the files in this directory are allowed to be displayed for selection.
4. IncludesNOEXEC allows SSI, but # exec and # include functions are not available.
5. Supported des allows SSI
6 FollowSymLinks in this directory, the server will track the symbolic links. Note: even if the server traces the symbolic link, it does not change the path name used to match different regions. If it is set in the <Local>; flag, this option is ignored.
7. SymLinksIfOwnerMatch only traces links in the site in this directory.
8. ExecCGI: CGI is allowed in this directory.