什么是 .htaccess 文件? [英] What is .htaccess file?
问题描述
我是 Zend 框架的初学者,我想更多地了解 .htaccess 文件及其用途.有人可以帮我吗?
I am a beginner to Zend framework and I want to know more about the .htaccess file and its uses. Can somebody help me?
我发现了一个这样的例子:
I found an example like this:
.htacess 文件
.htacess file
AuthName "Member's Area Name"
AuthUserFile /path/to/password/file/.htpasswd
AuthType Basic
require valid-user
ErrorDocument 401 /error_pages/401.html
AddHandler server-parsed .html
推荐答案
它不是 PHP 的一部分;它是 Apache 的一部分.
It's not part of PHP; it's part of Apache.
http://httpd.apache.org/docs/2.2/howto/htaccess.html一个>
.htaccess 文件提供了一种在每个目录的基础上进行配置更改的方法.
.htaccess files provide a way to make configuration changes on a per-directory basis.
本质上,它允许您采用通常会放在 Apache 的主要配置文件中的指令,并将它们放在特定于目录的配置文件中.它们主要用于您无权访问主要配置文件(例如共享主机)的情况.
Essentially, it allows you to take directives that would normally be put in Apache's main configuration files, and put them in a directory-specific configuration file instead. They're mostly used in cases where you don't have access to the main configuration files (e.g. a shared host).
这篇关于什么是 .htaccess 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!