Home  >  Article  >  Backend Development  >  PHP code to bind multiple domain names to the same space to access different pages_PHP tutorial

PHP code to bind multiple domain names to the same space to access different pages_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:59:52830browse

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; 

?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/317272.htmlTechArticle?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": hea...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn