2016-10-16 4 views
0

나는 URL 재 작성 '/ 견적/세부/e4dd5f4e4c705436ba381b0dc06fccc0'을 가지고 '?/견적/세부/retrieveQuote = e4dd5f4e4c705436ba381b0dc06fccc0'IIS URL을 두 번 다시 작성 하시겠습니까?

내가 참으로 stopProcessing 둘 때 나는 404를 얻을 수 있기 때문에이 작동
<rule name="Rewrite Saved Quote to Query String Type" stopProcessing="false"> 
    <match url="^quote/details/([^/]+)/?$" /> 
    <conditions> 
     <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
     <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
    </conditions> 
    <action type="Rewrite" url="quote/details/?retrieveQuote={R:1}" appendQueryString="true" /> 
</rule> 

올바른 출력 : 요청 된 URL 견적/세부/retrieveQuote = e4dd5f4e4c705436ba381b0dc06fccc0

이 지금 사용하여이 사이트의 나머지 부분과 같이 다시 작성해야 :

<rule name="Rewrite to Index" patternSyntax="Wildcard" stopProcessing="true"> 
    <match url="*" /> 
    <conditions> 
     <add input="{URL}" pattern="/admin/+" ignoreCase="false" negate="true" /> 
     <add input="{URL}" pattern="/api/+" ignoreCase="false" negate="true" /> 
     <add matchType="IsFile" negate="true" /> 
     <add matchType="IsDirectory" negate="true" /> 
    </conditions> 
    <action type="Rewrite" url="index.php" appendQueryString="true" /> 
</rule> 

하지만 난이 $ _SERVER [ 'REQUEST_URI'를] 사용하는 경우는 그것이 인쇄하지 않는 몇 가지 이유 : 견적/세부/e4dd5f4e4c705436ba381b0dc06fccc0하지만해야합니다 : 인용/세부/retrieveQuote = e4dd5f4e4c705436ba381b0dc06fccc0

모든 아이디어를 어떻게 얻는 방법? 제대로 작동합니까?

답변

0

나는이 문제에 대한 해결책을 찾을 수 없으므로 라우팅 규칙을 만들고 URL에서 필요한 매개 변수를 분할했습니다.