<%
MyUrl=request.Servervariables("SERVER_NAME")
UserName=left(MyUrl,instr(MyUrl,".")-1)
if instr(MyUrl,"bbyp.net") then
set rs=server.CreateObject("adodb.recordset")
rs.open("select * from Qyml where Username='"&UserName&"'"),conn1,1,1
if not rs.eof then
response.Redirect("http://www.bbyp.net/Shop/?CID="&rs("ID")&"")
else
response.Redirect("http://www.bbyp.net")
end if
rs.close
else
BlogUrl=LCase(Request.ServerVariables("HTTP_HOST"))
if instr(MyUrl,".blog.") then
response.Redirect("http://blog.wsypw.com/?BUrl="&BlogUrl&"")
else
set rs=server.CreateObject("adodb.recordset")
rs.open("select * from Qyml where Username='"&UserName&"'"),conn,1,1
if not rs.eof then
response.Redirect("http://www.wsypw.com/User/?CID="&rs("ID")&"")
else
response.Redirect("http://www.wsypw.com")
end if
rs.close
end if
end if
%>