使用url停止列出目录 [英] stop listing of directory using url

查看:68
本文介绍了使用url停止列出目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果网页访问者试图显示文件夹内容,如何使用网址

解决方案

只需在每个目录中放置一个index.html即可停止网页访问者。 (虽然您也可以停用目录列表(在Apache中,您可以使用.htaccess执行此操作))


@Dormilich


感谢您的回复,

在这里,我知道如何添加index.html文件。

但我不知道如何使用.htaccess文件。如果您不介意,可以解释一下如何使用它。


快速查看Apache文档

展开 | 选择 | Wrap | 行号

How can I stop the web visitors ,if they are trying to display the folder content ,using URL

解决方案

simply put an index.html in every directory. (although you could also deactivate directory listing (in Apache you?d do that with .htaccess))


@Dormilich
Thank you for your reply,
Here I know how to add index.html file.
but I don''t know how to use .htaccess file . if you don''t mind can you explain how to use it.


quick look at the Apache documentation

Expand|Select|Wrap|Line Numbers


这篇关于使用url停止列出目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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