如何隐藏某些文件类型使用Apache的.htaccess? [英] How to hide certain file type using apache .htaccess?

查看:182
本文介绍了如何隐藏某些文件类型使用Apache的.htaccess?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它,因为我已经需要破解打开.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...

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.

这篇关于如何隐藏某些文件类型使用Apache的.htaccess?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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