限制包含.htaccess文件的目录时出现问题 [英] Trouble in restricting the directory which contains .htaccess file

查看:93
本文介绍了限制包含.htaccess文件的目录时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

While i try to access the .htaccess file its saying access forbidden,which is obvious. But the listing of all other files also getting displayed,i.e no restrictions are imposed on those files which are under the same directory as the .htaccess. However i want to restrict everyone but myself from those files too. Here is my httpd.config

inside directory of httpd.config


Options Indexes FollowSymLinks Includes ExecCGI

AllowOverride ALL

Require all granted

<pre lang="xml">
<Files ".ht*">
	Require all denied
</Files>





我的.htaccess文件





my .htaccess file

# deny everyone but myself
<Limit GET POST PUT>
    Options -Indexes
    Order allow,deny
    Deny from all
</Limit>





代码块已更正[/ edit]



[edit]Code block corrected[/edit]

推荐答案

在httpd.config中,它以不同的方式完成,与.htaccess无关,它提供了目录的本地设置。请参阅,例如: http://stackoverflow.com/questions/1988267/apache- options-indexes-configuration-not-working [ ^ ]。



-SA
In httpd.config, it is done in a different way, unrelated to that of .htaccess, which provides setting local to the directory. Please see, for example: http://stackoverflow.com/questions/1988267/apache-options-indexes-configuration-not-working[^].

—SA


这篇关于限制包含.htaccess文件的目录时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆