[英]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.