2012-09-07 3 views
1

나는 다음과 같은 명령을 Appcmd.exe에 사용하여 상대 리디렉션을 설정하기 위해 노력하고있어 원인 : "참"/destination:"/Login/UnderConstruction.aspx "/ httpResponseStatus :"찾을 "IIS 리디렉션 순환 리디렉션

"웹 사이트 "는 "http://localhost:81"

그러나이 재귀 리디렉션을 야기 된 것으로 판단의 결합이있는 경우 때문에 I 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/ 

Google에서 검색했지만 동일한 문제가있는 사람을 찾을 수 없습니다. 재귀 적 리디렉션없이 모든 사이트 요청을 해당 사이트와 관련된 경로로 리디렉션 할 수 있습니까?

답변

1

나는 httpredirect 예를 들어

내에서이 와일드 카드를 사용을 해결 한 다음 스크립트 작동 :

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