不想从浏览器网址显示我的文件夹文件结构 [英] Don't want to show my folder file structure from browser url
本文介绍了不想从浏览器网址显示我的文件夹文件结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不想显示我的图像,zip文件或任何其他文件。因为所有这些非常重要的文件。
I don't want to show my images, zip files or any other files. Because all of these very important files.
假设我的图片网址像这样
Suppose my image url like it
http://www.example.com/users/upload/images/example.jpg
如果任何人都可以使用以下URL并使用浏览器URL,那么他们可以看到我的所有其他图像。
And if anyone can take below url and go with browser url then they can see my all other images.
http://www.example.com/users/upload/images/
我不想显示我的图像文件,或者我想显示未找到的404页面。
I don't want to show my images files, Or i want to show some 404 page not found.
有人知道上述问题的解决方案吗?
Can anyone know the solution of above problem?
推荐答案
您可以为该文件夹(图像)创建一个 .htaccess
文件,该文件夹应已拒绝使用
You can create a .htaccess
file for the folder(images), which should have denied access with
Deny from all
或者您可以重定向到自定义404页面
or you can redirect to a custom 404 page
Redirect /images/ 404.html
有关更多信息,
http://www.sitepoint.com/htaccess-for-all/
这篇关于不想从浏览器网址显示我的文件夹文件结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文