广 告 位 置 |
|
|
 |
站 内 搜 索 |
|
|
 |
|
|
|
|
域名绑定到目录方法集
来源:盛绿设计 等级:默认等级
发布于2006-09-05 15:02 被读56次 【字体:大 中 小】
|
|
HTML代码格式:
CODE: <html> <script language=javascript> if(this.location=="http://www.zxfree.net/") {this.location.href="index1.htm";} else if(this.location=="http://zxfree.net/") {this.location.href="index1.htm";} else if(this.location=="http://zxfree.cn/") {this.location.href="blog";} else if(this.location=="http://www.zxfree.cn/") {this.location.href="blog";} </script> </html>
[Copy to clipboard]
ASP代码格式之一:
CODE: <html> <script language=javascript> if(this.location=="http://www.zxfree.net/") {this.location.href="index1.htm";} else if(this.location=="http://zxfree.net/") {this.location.href="index1.htm";} else if(this.location=="http://zxfree.cn/") {this.location.href="blog";} else if(this.location=="http://www.zxfree.cn/") {this.location.href="blog";} </script> </html> [Copy to clipboard]
ASP代码格式之二:
CODE: <% Dim StrDomain StrDomain=Request.ServerVariables("SERVER_NAME") '获得包含域名的字符串
select case StrDomain case "http://www.aaa.com" Response.redirect "http://www.aaa.com/aaa/index.asp" case "http://www.bbb.com" Response.redirect "http://www.bbb.com/bbb/index.asp" case else Response.write "未知错误" end select %> [Copy to clipboard]
PHP代码格式:
CODE: <?php switch ( $_SERVER["HTTP_HOST"]) { case "www1.zxfree.net": header("location:index1.htm"); break; case "www2.zxfree.net": header("location:index2.htm"); break; case "www3.zxfree.net": header("location:index3.htm"); ...... 继续添加 ...... break; } ?>
|
相关专题:暂无相关专题
上一篇:不改NS进行域名绑定 下一篇:限制国外访客浏览你的中文网页
|
共有评论 0 条 网友评分 查看全部
|
|
|