大网数据广告活动
网站运营与故障问答

If I hide files in my web servers directory root, can users find them anyway?

· 52CE 我爱测

More specifically, how can I theoretically find the files that is in a website's root directory? For example: My current imaginary website has 2 folders (labeled rescources and screenies ) and 3 files (labeled index.html , index.…

问题原文

原帖链接 · TheFuzzyFish · CC BY-SA 3.0

More specifically, how can I theoretically find the files that is in a website's root directory?

For example:

My current imaginary website has 2 folders (labeled rescources and screenies) and 3 files (labeled index.html, index.alt.html, and favicon.ico).

I am aware that, if no index.html or index.php exists, Apache automatically routes users that attempts to visit that virtual host to a directory page giving raw access to the files in the root folder (or whichever folder they specify).

Because most folders and or root directories of people's web servers have an index.html or index.php, the average user cannot access a directory page listing all files in the active directory... Right?

Is there a way that, not including brute-forcing to attempt to find the directory name, a user can find my rescources or screenies folders, or even my index.alt.html without being told to navigate to https://[MY_SERVER]/rescources/ or has found where an html file that they have access to has referenced it?

已采纳解答

原帖链接 · Steve · CC BY-SA 3.0

If you discount that a person has some inside knowledge, the answer is no. How can anyone know about something that they can't see or know about?

But what is the point of having these folders if you aren't using some of the content? Assuming you do use the content, unless you are doing some really fancy coding, then you have to link to the content and therefore the answer is also yes, as those links are going to be visible in source code.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2016-06-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。