Iis 服务器变量path_info获取的值为true,但在浏览器上不可见

Iis 服务器变量path_info获取的值为true,但在浏览器上不可见,iis,redirect,asp-classic,Iis,Redirect,Asp Classic,当用户到达http://www.domain.com/index.asp 我需要它将他重定向到http://www.domain.com 在那台服务器上,我还没有Isapi,所以我想在index.asp页面中进行 我查一下 Request.ServerVariables(“PATH\u INFO”)它将始终返回/index.asp,即使它不在浏览器的url中 那么,在iis或代码(无需isapi重写)中,将用户从index.asp重定向到域的解决方案是什么呢?尝试以下方法: response.r

当用户到达
http://www.domain.com/index.asp
我需要它将他重定向到
http://www.domain.com

在那台服务器上,我还没有Isapi,所以我想在
index.asp
页面中进行

我查一下
Request.ServerVariables(“PATH\u INFO”)
它将始终返回
/index.asp
,即使它不在浏览器的url中

那么,在iis或代码(无需isapi重写)中,将用户从index.asp重定向到域的解决方案是什么呢?

尝试以下方法:

response.redirect "."
试试这个:

response.redirect "."

如果将
index.asp
定义为默认页面,您将进入无限循环。首先通过IIS定义不同的默认页面。如果将
index.asp
定义为默认页面,您将进入无限循环。首先通过IIS定义不同的默认页面。