2011-07-08 59 views
0

我有這樣example.com/sample.html?h=22 &瓦特的URL = 23UrlRewriteFilter:刪除參數

如何使用UrlRewriteFilter這個URL除去PARAMS和重定向的URL例如請求.COM/sample.html?我需要刪除參數,因爲我的應用程序(託管在Tomcat上)不處理這些參數。

回答

0
<urlrewrite> 
    <rule> 
     <note>Forward calls from sample.html to sample.html with no query_string</note> 
     <from>^/sample.html$</from> 
     <to type="redirect" last="true">/sample.html</to> 
    </rule> 
<urlrewrite> 

您可能想使用forward而不是redirect,取決於我們的情況。