Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache httpd是否在所有更高级别的目录中查找.htaccess文件?_Apache_.htaccess - Fatal编程技术网

Apache httpd是否在所有更高级别的目录中查找.htaccess文件?

Apache httpd是否在所有更高级别的目录中查找.htaccess文件?,apache,.htaccess,Apache,.htaccess,给定目录www/html/file.php,将my.htaccess与file.php放在一起是否合适 这样就可以为file.php制定规则(下面的演示示例) 将找到file.php 否。这取决于特定目录的AllowOverride设置-但是,在大多数配置中,文档根目录启用了AllowOverride 看 根据该文档,如果可能,您应该将任何规则放入全局配置文件而不是.htaccess文件中。如果无法访问全局配置文件,则应将.htaccess文件放入其应用的文件夹。不清楚您想知道什么。“.htac

给定目录www/html/file.php,将my.htaccess与file.php放在一起是否合适

这样就可以为file.php制定规则(下面的演示示例)


将找到file.php

否。这取决于特定目录的
AllowOverride
设置-但是,在大多数配置中,文档根目录启用了
AllowOverride


根据该文档,如果可能,您应该将任何规则放入全局配置文件而不是.htaccess文件中。如果无法访问全局配置文件,则应将
.htaccess
文件放入其应用的文件夹。

不清楚您想知道什么。“.htaccess文件提供了一种按目录进行配置更改的方法。”好的,我明白了
~Rule~ file.php ...