0

http 상태 코드가 404 인 경우 Azure에서 웹 페이지로 리디렉션하도록 웹 응용 프로그램을 구성하려고합니다. 이것은 Azure의 정적 HTML 사이트입니다. 나는이 내용으로의 Web.config와 ApplicationHost.xdt 파일을 추가하고 아무것도하지 않는 : 나는 이러한 변경 한 후 웹 응용 프로그램을 다시 시작했습니다azure 사용자 지정 404 페이지로 리디렉션합니다.

<system.webServer> 
<httpErrors errorMode="Custom" existingResponse="Auto" defaultResponseMode="ExecuteURL" > 
    <remove statusCode="404"/> 
    <error statusCode="404" responseMode="ExecuteURL" path="http://www.website.com/404/index.html" /> 
</httpErrors> 

을하고 그것을하지 않았다 아무것도.

답변

3

웹 구성 파일의 기본 경로가 /404/index.html ""으로 바뀌면 올바르게 작동합니다. 시도해보십시오.

<system.webServer> 
    <httpErrors errorMode="Custom" existingResponse="Auto" defaultResponseMode="ExecuteURL" > 
     <remove statusCode="404"/> 
     <error statusCode="404" responseMode="ExecuteURL" path="/404/index.html" /> 
    </httpErrors> 
    </system.webServer>