Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种方法来访问包含 index.html 或 index.php 的站点中的文件夹。但是当我删除索引文件时,当我尝试从 url 访问内容列表时,我得到
404 page not found
错误 ;
这是否可以查看具有我所说的功能的文件夹的内容,如果可以,为什么?
您可以在.htaccess文件中启用目录列表,将其放入要浏览的目录中:
.htaccess
Options +Indexes
但是您收到 404 错误这一事实也可能意味着该目录在服务器上根本不存在。所以确保它存在并且.htaccess里面有一个允许目录浏览的文件。