|
发表于 2007-9-24 20:06:30
|
显示全部楼层
我猜你是要地址转发或地址改写吧.
这种效果有几种方法可以实现.
用PHP实现的方法如下:
[php]
<?php
header('Location: apache_default2/index.php');
?>
[/php]
用HTML实现的方法如下:
[php]
<html>
<head>
<META HTTP-EQUIV="refresh" content="0;url=apache_default2/index.html">
</head>
</html>
[/php]
当然也可以用apache的mod_rewrite
具体方法去见
http://www.kreny.com/docs/apache2.0/mod/mod_rewrite.html
http://www.baidu.com/s?ie=gb2312 ... od_rewrite&ct=0
但是你看到的apache2_default是另外一个东西.在apache的配置文件中,或在conf.d/welcome.conf中
[php]
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
[/php] |
|