2014-05-14 3 views
0

매우 이상한 점;Web.config 슬래시가없는 다른 URL로 리디렉션

http://www.example.com/my-page.html/ 
: 404의 결과로,

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
    <httpRedirect enabled="true" destination="http://www.example.com/my-page.html" /> 
    </system.webServer> 
</configuration> 

그러나 후행 슬래시가 URL에 추가됩니다 : 저는 특정 페이지에 하나 개의 도메인에서 다른 도메인에있는 모든 리디렉션 web.config 파일에 다음을 사용하고 있습니다

후행 슬래시없이 강제로 리디렉션 할 수 있습니까?

감사합니다.

답변

1

사용자 설정에 exactDestination="true"을 추가하십시오. 이 모양은 다음과 같습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
    <httpRedirect enabled="true" destination="http://www.example.com/my-page.html" exactDestination="true" /> 
    </system.webServer> 
</configuration> 
+0

완벽하게 작동합니다. –

관련 문제