2016-12-30 1 views
0

그래서 내 URL은 'http://localhost:1272/pdp/Gitanjali-1GMRose995-24KtGoldCoin?id=GR-995-1GM-12269'입니다. URL에 'pdp'라는 단어가 포함되어 있으면 IIS가 특정 페이지로 리디렉션하도록합니다. 그러나 이것은 URL에 넣는 제품 이름의 일부로도 발생할 수 있으므로 pdp이라는 단어가 아닌 /pdp/과 일치하는 IIS를 원합니다.URL 재 작성이 잘못 일치 함 IIS

이것은 내가 뭘하려 :

<rule name="test" stopProcessing="true"> 
     <match url="/pdp/" /> 
     <action type="Rewrite" url="/Product/ProductDisplay.aspx" logRewrittenUrl="true" /> 
    </rule> 


    <rule name="test" stopProcessing="true"> 
     <match url="\/pdp\/" /> 
     <action type="Rewrite" url="/Product/ProductDisplay.aspx" logRewrittenUrl="true" /> 
    </rule> 

이 규칙은 모두 다음과 일치 할 수 없습니다 : 내가 잘못 뭐하는 거지
http://localhost:1272/pdp/Gitanjali-1GMRose995-24KtGoldCoin?id=GR-995-1GM-12269

?

+0

시도해주십시오. user3151766

답변

0

답변을 찾았습니다. pdp가 url의 시작 부분에 있기 때문에 첫 번째/in/pdp /는 필요하지 않습니다. 제거하고 조건을

<rule name="test" stopProcessing="true"> 
    <match url="pdp\/" /> 
    <action type="Rewrite" url="/Product/ProductDisplay.aspx" logRewrittenUrl="true" /> 
</rule> 

으로 수정했습니다.

관련 문제