<?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:in来源gaodaimacom搞#^代%!码网dex3.htm”);
…… 继续添加 ……
break;
}
?>
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:in来源gaodaimacom搞#^代%!码网dex3.htm”);
…… 继续添加 ……
break;
}
?>
以上就是同一空间绑定多个域名而实现访问不同页面的PHP代码的详细内容,更多请关注gaodaima搞代码网其它相关文章!