2011-01-31 28 views
0
 <rule name="updates" stopProcessing="true"> 
      <match url="updates/" ignoreCase="true" /> 
      <action type="Rewrite" url="update.cfm" /> 
     </rule> 

這個工作正常,除了像updates/signin.cfm之類的更新之類的任何頁面也重定向到update.cfm。我如何才能使它適用於只有當URL結束時updates/url rewrite for folder/base only

回答

1

URL重寫在其匹配表達式中使用RegEx,所以在匹配結束時,確保將其描述爲'行尾'。我的正則表達式是生鏽的,但也許它的

「更新/ $」?另外,你可能必須逃離比賽中的/。

http://www.regular-expressions.info/anchors.html