我怎样才能创建一个简单的index.html文件列出了所有的文件/目录? [英] How can I create a simple index.html file which lists all files/directories?

查看:2528
本文介绍了我怎样才能创建一个简单的index.html文件列出了所有的文件/目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用Apache服务器不允许目录列表。

We use an apache server that does not allow directory listing.

有一个特定的目录,我想允许上市。

There is a specific directory I would like to allow listing of.

如何让一个简单的HTML文件,将包含此目录中的内容?

How can make a simple HTML file that will contain the contents of this directory?

推荐答案

您可以:
写如PHP,JSP,ASP.net等服务器端脚本页面动态生成HTML这个

You can either: Write a server-side script page like PHP, JSP, ASP.net etc to generate this HTML dynamically

设置您正在使用(例如Apache)的为不包含欢迎页目录(例如,index.html)

Setup the web-server that you are using (e.g. Apache) to do exactly that automatically for directories that doesn't contain welcome-page (e.g. index.html)

特别在阿帕奇在这里阅读更多:
编辑httpd.conf:
http://justlinux.com/forum/showthread.php?s=&postid=502789#post502789

或添加自动索引mod:
http://httpd.apache.org/docs/current/mod/mod_autoindex.html

or add the autoindex mod: http://httpd.apache.org/docs/current/mod/mod_autoindex.html

这篇关于我怎样才能创建一个简单的index.html文件列出了所有的文件/目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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