PHP跳转代码

不一样域名跳转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

相关文章
相关标签/搜索