次のコマンドで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/
私はグーグルでこれを検索しましたが、同じ問題を抱えている人を見つけることができません。再帰的なリダイレクトを発生させずに、すべてのサイト要求をそのサイトに相対的なパスにリダイレクトする方法はありますか?