如何隐藏某些文件类型使用Apache的.htaccess?文件类型、Apache、htaccess

2023-09-02 00:32:46 作者:拼搏、只为成就梦想

它,因为我已经需要破解打开.htaccess文件很长一段时间...

什么是最简单的方式40X prevent访问特定的文件扩展名,虽然从整个网站?

解决方案

 < FilesMatch(htaccess的|的htpasswd | INI |登录| SH |股份有限公司| BAK)$。&GT ;
订购允许,拒绝
所有拒绝
< / FilesMatch>
 

加载一些常用的扩展,增加更多,因为你需要。

Its been a long time since I've needed to crack open an .htaccess file...

apache不能解析php文件 Apache中.htaccess文件利用的总结与新思路拓展

What is the simplest way to 40x prevent access to a specific file extension though out the entire site?

解决方案

<FilesMatch ".(htaccess|htpasswd|ini|log|sh|inc|bak)$">
Order Allow,Deny
Deny from all
</FilesMatch>

Loaded with some common extensions, add more as you need.