【发布时间】:2012-09-07 10:05:59
【问题描述】:
我正在尝试使用 appcmd.exe 和以下命令设置相对重定向:
appcmd.exe set config "Website" -section:system.webServer/httpRedirect /enabled:"True" /destination:"/Login/UnderConstruction.aspx" /httpResponseStatus:"Found"
“网站”的绑定为"http://localhost:81"
但是这似乎导致了递归重定向,因为当我访问localhost:81时,会生成以下路径:
http://localhost:81/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/Login/UnderConstruction.aspx/
我在谷歌上搜索过这个,但我找不到有同样问题的人。有没有办法将所有站点请求重定向到相对于该站点的路径而不会导致递归重定向?
【问题讨论】:
标签: asp.net redirect iis-7 recursion appcmd