Home > Backend Development > PHP Tutorial > 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
Release: 2016-07-21 15:59:52
Original
863 people have browsed it

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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template