第一段 PHP 代码
<?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;
}
?>
第二段 ASP 代码
1.
<%
select case request.servervariables("http_host")
case "www1.aspcn.net"
Server.Transfer("index1.htm")
case "www2.aspcn.net"
Server.Transfer("index2.htm")
case "www3.aspcn.net"
Server.Transfer("index3.htm")
...... 继续添加 ......
end select
%>
2.
<%if Request.ServerVariables("SERVER_NAME")="www.ww.com" then
response.redirect "rww/"
else%>
<%end if%>
<%if Request.ServerVariables("SERVER_NAME")=www.ww.net then
response.redirect "ww/"
else%>
<%end if%>
3.
<%
if Request.ServerVariables("SERVER_NAME")="www.rwen.com" then
response.redirect "wwwen/index.asp"
else
response.redirect "websites/"
end if
%>
4.
<%
from=lcase(Request.ServerVariables("HTTP_HOST"))
if left(from,4)="www." then
Response.redirect("index.asp")'此处为网站首页地址
else
response.Write( "<frameset><frame src=""blog.asp?domain="&from&"""></frameset>")
end if
%>
第三段 JSP代码:
<SCRIPT>try { if( self.location == "http://玉米一/" ) {top.location.href = "http://玉米一/目录";}
else if( self.location == "http://玉米二/" ) {top.location.href = "http://玉米二/目录";}
else if( self.location == "http://玉米三/" ) {top.location.href = "http://玉米三/目录";}
else if( self.location == "http://玉米四/" ) {top.location.href = "http://玉米四/目录";}
else { document.write ("错误的访问地址") } } catch(e) { }</SCRIPT>
| 如何针对Yahoo搜索进行网站优化 | 04-04 | |
| 搜索引擎不收录网站页面的15个原 | 04-04 | |
| 网站推广29大法 | 04-04 | |
| 搜索引擎优化培训教程 | 04-02 | |
| 彻底弄懂CSS盒子模式(DIV布局快速 | 03-19 | |
| Google优化圣经 | 03-19 | |
| 新网站流量快速提高实战 | 02-07 | |
| 2007年,个人站长将何去何从? | 02-03 | |
| 个人网站到底应该做什么样的广告 | 01-29 | |
| 王通:网站的首页最应该放什么? | 01-25 | |
| 百度与站长:关于网站收录删除和 | 01-04 | |
| 搜索引擎对页面各元素的权重比例 | 12-26 | |