同一空间绑定多个域名而实现访问不同页面的PHP代码

内容摘要
<?php switch ($_SERVER["HTTP_HOST"]) { case "www1.aspcn.net": header("location:index1.htm"); break; case "www2.aspcn.net": header("location:index2.htm");
文章正文
<?php
switch ($_SERVER["HTTP_HOST"]) {
case "www1.aspcn.net":
header("location:index1.htm");
break;
case "www2.aspcn.net":
header("location:index2.htm");
break;
case "www3.aspcn.net":
header("location:index3.htm");
...... 继续添加 ......
break;
}
?>


代码注释

作者:喵哥笔记

IDC笔记

学的不仅是技术,更是梦想!