Url rewriting URL重写筛选器:删除参数
我有一个类似example.com/sample.html的URL?h=22&w=23 如何使用UrlRewriteFilter从此URL中删除参数并使用URL example.com/sample.html重定向请求?我需要删除这些参数,因为我的应用程序(托管在Tomcat上)无法处理这些参数。Url rewriting URL重写筛选器:删除参数,url-rewriting,Url Rewriting,我有一个类似example.com/sample.html的URL?h=22&w=23 如何使用UrlRewriteFilter从此URL中删除参数并使用URL example.com/sample.html重定向请求?我需要删除这些参数,因为我的应用程序(托管在Tomcat上)无法处理这些参数。 <urlrewrite> <rule> <note>Forward calls from sample.html to sample.htm
<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>
将调用从sample.html转发到sample.html,无查询字符串
^/sample.html$
/sample.html
您可能希望使用前进而不是重定向,这取决于我们的情况