UrlRewriteFilter: remove parameters
I have a URL like example.com/sample.html?h=22&w=23
开发者_C百科How can use UrlRewriteFilter to remove the params from this URL and redirect the request with the URL example.com/sample.html? I need to remove the params because my application (hosted on Tomcat) does not handle these.
<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>
you might want to use forward rather than redirect, depends on our circumstances.
精彩评论