0

到目前为止,我有:

order deny,allow
deny from all
allow from 127.0.0.1/8

这会阻止我试图向除我之外的任何人隐藏的文件夹的顶级目录(不是根目录),但它不会阻止子目录。我仍然想访问该目录,并且我看到的所有示例都使用重写引擎来完全阻止来自子目录的访问。我如何也阻止子目录?这与第一个建议的问题相反:

如何使 .htaccess 在当前目录而不是子目录上工作?

4

2 回答 2

0

At first, I thought the closed beta packages I was testing were overriding my .htaccess file with their own, but they did not override any directory permissions.

At Kamil's suggestion, I looked into my httpd.conf and noticed that AllowOverride was set to None for the root directory of my web server. Setting it to All worked like a charm.

于 2012-11-19T13:58:47.390 回答
0

您引用的配置可以根据需要工作。

如果它确实仅阻止当前目录但您可以访问它的子目录-这就是我理解您的描述的方式-这意味着,您通过一些进一步.htaccess和/或配置更改了访问规则,httpd.confallow from all

于 2012-11-18T13:24:13.430 回答