首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

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

整理日期:2007年08月22日 【字体:

第一段 PHP 代码

<?php
switch ($_SERVER["HTTP_HOST"]) {
 case "www.fcxx.net":
  header("location:index.htm");
  break;
 case "www.afoer.com":
  header("location:index.html");
  break;
 case "www.etoow.com":
  header("location:default.html");
...... 继续添加 ......
  break;
}
?>

第二段 ASP 代码

1.
<%
select case request.servervariables("http_host")
case "www.fcxx.net"
Server.Transfer("index.htm")
case "www.afoer.com"
Server.Transfer("index.html")
case "www.etoow.com"
Server.Transfer("default.html")
...... 继续添加 ......
end select
%>

2.
<%if Request.ServerVariables("SERVER_NAME")="www.etoow.com" then
response.redirect "etoow/"
else%>

伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-08/1187748885.html
<%end if%>
Tags:
同一空间绑定多个域名而实现访问不同的页面代码,PHP,JSP和ASP代码
'http://www.etoow.com/html/2007-08/1187748885.html
1
 
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved