.htaccess 拒绝访问除一个文件之外的所有文件 [英] .htaccess deny access to all except to one file
本文介绍了.htaccess 拒绝访问除一个文件之外的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何拒绝访问整个文件夹和子文件夹(一个文件除外)?该文件是:toon.php 并驻留在同一文件夹中.
How can I deny access to a complete folder and sub-folders, with the exception of one file? That file is: toon.php and resides in the same folder.
推荐答案
Order Allow,Deny
<FilesMatch "^toon.php$">
Allow from all
</FilesMatch>
这可能是你能得到的最有效的方法.
That is probably the most efficient that you can get.
这篇关于.htaccess 拒绝访问除一个文件之外的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文