当前位置: 首页 > 图文教程 > 网络编程 > ASP > 多个绑定多域名的ASP代码
第一种方法:
如果有有一个ASP空间,而你又想放置多个多个站点,这些代码可以帮到你:
| 以下为引用的内容: 第一个 <%if Request.ServerVariables("SERVER_NAME")="www.netbei.com" then response.redirect "zkj" else response.redirect "i.htm" end if%> 第二个 第三个 第四个 |
以下为引用的内容: 第二种方法:
<%
dim domainname,result
domainname=Request.ServerVariables("SERVER_NAME")
result=right(domainname,12)
if result="my.netbei.com" then
%>
<!--#include file=mynetbei.asp -->
<%
Elseif result="rtisancn.com" then
%>
<!--#include file=artisan.asp -->
<%
Elseif result="gn.netbei.com" then
%>
<!--#include file=web.asp -->
<%
Elseif result=".forwest.com" then
%>
<!--#include file=forwest_com.asp -->
<%
Else
%>
<!--#include file=netbei.asp -->
<%
End if
%>
评论 (0) All