开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜