不一樣域名跳轉php
<?php
switch ($_SERVER["HTTP_HOST"]) {
/*訪問此域名時跳轉至nj*/
case "whbi.net":
header("location:/nj/");
break;
/*訪問此域名時跳轉至nj*/
case "www.whbi.net":
header("location:/nj/");
break;
case "test.whbi.net":
header("location:index3.htm");
break;
}
?>web
單獨頁面跳轉.net
<?php
header('location:/web/index.php');
//首頁跳轉
?>htm