让apache显示目录列表的配置方法
2013-02-09 17:21
961 查看
1、apache中显示目录列表
在http.conf中加入如下代码(如有虚拟主机配置,加在虚拟主机配置段内),并把主目录内的index.pho,index.html,index.htm文件删除
Alias /download "/download"
<Directory "/download">
Options Indexes
Order allow,deny
IndexOptions Charset=UTF-8
Allow from all
</Directory>
其中“/download”是要显示文件列表的目录,参数"Options Indexes"表示启用目录浏览,"IndexOptions Charset=UTF-8"设置字符集,以消除中文乱码。
2、访问虚拟目录时可用"http://ip/alias"的形式,也可把主目录内的index.php或index.html文件用如下代码代替,实现用"http://ip"即可自动跳转到指定的虚拟目录,"("count()",60)"内的60表示跳转倒计时为60ms。
复制代码 代码如下:<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>正在进入</title>
</head>
<body>
<form name=loading>
<p align=center> <font color="#0066ff" size="5">正在进入,请稍等</font><font color="#0066ff" size="5" face="Arial">......</font>
<input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#0066ff; background-color:#fef4d9; padding:0px; border-style:none;">
<input type=text name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;">
<script>
var bar=0
var line="||"
var amount="||"
count()
function count(){
bar=bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99)
{setTimeout("count()",60);}
else
{
window.location = "//www.jb51.net";}
}</script>
</p>
</form>
</body>
</html>
您可能感兴趣的文章:
相关文章推荐
- 虚拟主机中让apache显示目录列表的配置方法
- 不让tomcat显示目录文件列表的配置方法
- 让tomcat显示目录文件列表的配置方法
- 1开启关闭apache 服务器所有网站显示目录的配置方法
- 不让tomcat显示目录文件列表的配置方法
- 不让tomcat显示目录文件列表的配置方法
- Apache配置多个监听端口和不同的网站目录的简单方法
- apache 2.4.1 配置文件目录浏览并优化显示
- Apache中禁止显示目录文件列表
- Apache Direcotry Indexes目录列表显示样式定制
- Apache设置禁止显示网站目录列表
- Apache无法自动跳转却显示目录的解决方法
- apache 启用虚拟目录的设置方法,及配置合集
- apache配置不显示目录结构
- 禁止apache显示目录索引的常见方法(apache禁止列目录)
- Apache Direcotry Indexes目录列表显示样式定制
- Apache虚拟目录配置及vue-cli反向代理的设置方法
- linux下的apache在httpd.conf配置目录别名和include引入自配置文件配置的方法
- 配置nginx显示目录文件列表
- Apache下禁止显示网站目录结构的方法