的.htaccess拒绝存取权限给所有除了一个文件 [英] .htaccess deny acces to all except to one file
本文介绍了的.htaccess拒绝存取权限给所有除了一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么能拒绝访问一个完整的文件夹和子文件夹,除了一个文件? 该文件是:toon.php并驻留在同一文件夹
解决方案
订购允许,拒绝
< FilesMatch^香椿\的.php $>
所有允许
< / FilesMatch>
这可能是最有效的,你可以得到。
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屋!
查看全文