.HTACCESS 文件扩展名
Apache HTACCESS File
| 开发者 | 不适用 |
| 受欢迎程度 |
3.9 | 34 票 |
什么是 HTACCESS 文件?
An HTACCESS file is a configuration file used by an Apache web server that provides instructions for different directories of a website. "Htaccess" is short for HTTP access, which is the protocol used to transmit webpages.
更多信息
A website's .htaccess file can be used to perform several important functions, including:
- Defining the index page of a directory (i.e. "index.html" or "index.php")
- Specifying the 404 (Page Not Found) error page
- Performing 301 or 302 page redirects
- Denying access from specific IP address or other websites
- Restricting access to certain directories and pages
- Executing MOD_REWRITE instructions
The .htaccess file is always named .htaccess and does not include a filename before the dot. It is placed in the root directory of a website and is processed by the web server each time a webpage is accessed.
The Apache .htaccess Tutorial includes additional information about how and when to use .htaccess files.
如何打开 HTACCESS 文件
Because .htaccess files are plain text files, you can open and edit them with any text editor. To learn how to use an .htaccess with an Apache web server, refer to the Apache .htaccess Tutorial.