簡體   English   中英

使用重寫模塊使用IIS7重定向查詢字符串

[英]Query string with whitespace IIS7 Redirect using Rewrite module

需要重定向http://www.domain.com/one/two/three/four?addFilter=five&filterValue=六個

http://www.domain.com/four/six-seven?showproducts=true

URL的空白20%到7到7之間有問題

<rule name="PatternRedirect" stopProcessing="true">
          <match url="one/two/three/four.*" />
          <conditions trackAllCaptures="true">
                        <add input="{QUERY_STRING}" pattern="filterValue=([a-z]+).*([a-z]+)" />
                        <add input="{HTTP_HOST}" pattern="domain.com$" />
          </conditions>
 <action type="Redirect" url="http://domain.com/womens/{C:1}-{C:2}" redirectType="Permanent" />
        </rule>

有什么想法嗎?

嘗試空白字符類:

<add input="{QUERY_STRING}" pattern="filterValue=([a-z]+)\s*([a-z]+)" />

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM