asp的来访域名跳转程序,不能实现,帮我看看为什么?
程序的目的:当输入的域名是192.168.1.10/tz1,则跳转到dongfanghotel1/index.asp执行
依次类推,这样可以达到一个空间放多个网站(我是买的空间)
(程序在end if出错)
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
if instr(request.ServerVariables("server_name"),"192.168.1.10/tz1")then
response.Redirect"/dongfanghotel1/index.asp"
else if instr(request.ServerVariables("server_name"),"192.168.1.10/tz2")then
response.Redirect"/dongfanghotel2/index.asp"
end if
%>
</body>
</html>