Asp.net 使用appcmd的IIS重定向导致递归重定向

Asp.net 使用appcmd的IIS重定向导致递归重定向,asp.net,redirect,iis-7,recursion,appcmd,Asp.net,Redirect,Iis 7,Recursion,Appcmd,我正在尝试使用以下命令使用appcmd.exe设置相对重定向: appcmd.exe设置配置“网站”-节:system.webServer/httpRedirect/enabled:“True”/destination:“/Login/UnderConstruction.aspx”/httpResponseStatus:“Found” “网站”具有的绑定http://localhost:81“ 但是,这似乎会导致递归重定向,因为当我访问localhost:81时,会生成以下路径: http://

我正在尝试使用以下命令使用appcmd.exe设置相对重定向:

appcmd.exe设置配置“网站”-节: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/

我已经在谷歌上搜索过了,但是我找不到有同样问题的人。有没有一种方法可以将所有站点请求重定向到与该站点相关的路径,而不会导致递归重定向?

我已经在httpredirect中使用通配符解决了这个问题

例如,以下脚本可以工作:

appcmd.exe set config "Website" -section:system.webServer/httpRedirect /+"[wildcard='*.aspx',destination='/Login/UnderConstruction.aspx']" /destination:"" /enabled:"True" /exactDestination:"False" /childOnly:"False"

我已经在httpredirect中使用通配符解决了这个问题

例如,以下脚本可以工作:

appcmd.exe set config "Website" -section:system.webServer/httpRedirect /+"[wildcard='*.aspx',destination='/Login/UnderConstruction.aspx']" /destination:"" /enabled:"True" /exactDestination:"False" /childOnly:"False"