首页 > 开发 > PHP > 正文

同一空间绑定多个域名而实现访问不同页面的PHP代码

2024-05-04 22:14:16
字体:
来源:转载
供稿:网友
<?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": 
        header("location:index3.htm"); 
...... 继续添加 ...... 
        break; 

?>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表