将这两个文件保存为默认首页即可。如default.asp default.php
asp
代码语言:javascript
复制
<%if Request.ServerVariables("SERVER_NAME")="www.ilkhome.cn" then response.redirect "boke" elseif Request.ServerVariables("SERVER_NAME")="ilkhome.cn" then response.redirect "boke" elseif Request.ServerVariables("SERVER_NAME")="updata.ilkhome.cn" then response.redirect "updata"
else
response.redirect "404.php"
end if%>
php
代码语言:javascript
复制
<?php
switch ($_SERVER["HTTP_HOST"]) {
case "www.ilkhome.cn":
header("location:boke");
break;
case "ilkhome.cn":
header("location:boke");
break;
case "update.ilkhome.cn":
header("location:update");
break;
default:
header("location:404.php");
break;
}
?>