myIp = Array("127.0.0.1","goudiannao")
myHou = new Array("",".com")
myDirect =" http://www.goudiannao.com/"
ip= request.ServerVariables("HTTP_HOST")
j=0
for i=0 to ubound(myIp)
'Response.Write(i&"--"&myIp(i)&"<br>")
if InStr(ip,myIp(i)&myHou(i))>0 then
'Response.Write(myIp(i)&"==")
j=j+1
end if
next
if j<1 then
response.Redirect(myDirect)
end if
转载于:https://www.cnblogs.com/wangdetian168/archive/2011/03/06/1972278.html