禁止访问特定文件夹中的文件 [英] Prevent access to files in a certain folder
本文介绍了禁止访问特定文件夹中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个包含很多 .php
文件的文件夹。我想拒绝访问它们(使用 .htaccess
)。我知道一种选择是将该文件夹移到 public_html
之外,但这在这种情况下是不可能的。
I have a folder with a lot of .php
files. I would like to deny access to them (using .htaccess
). I know an option is to move this folder outside public_html
, but this is not possible in this situation.
是可以阻止访问整个文件夹吗?
Is is possible to block access to a whole folder?
推荐答案
将其添加到 .htaccess
文件:
order deny,allow
deny from all
这篇关于禁止访问特定文件夹中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文