UrlRewriteFilter: remove parameters

前端 未结 1 1900
醉酒成梦
醉酒成梦 2021-01-26 14:11

I have a URL like example.com/sample.html?h=22&w=23

How can use UrlRewriteFilter to remove the params from this URL and redirect the request with the URL example.com

相关标签:
1条回答
  • 2021-01-26 14:30
    <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 讨论(0)
提交回复
热议问题