Home > Article > Backend Development > PHP code to bind multiple domain names to the same space to access different pages_PHP tutorial
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;
}
?>