Java 使用&;重写URL;不带查询字符串

Java 使用&;重写URL;不带查询字符串,java,tuckey-urlrewrite-filter,Java,Tuckey Urlrewrite Filter,在与tuckey的URLrewrite一起使用时遇到问题..我的要求如下 当url包含dev/auth/dev/时,它后面的任何内容都应该重定向到另一个url,包括查询字符串 示例:http://:8080/dev/auth/dev/student/exam 应该重定向到 http://:8080/学院/学生/考试 如果url包含查询字符串,则还应在最后一个 ex: http://<myhost>:8080/dev/auth/dev/student/exam?internal=mep

在与tuckey的URLrewrite一起使用时遇到问题..我的要求如下 当url包含dev/auth/dev/时,它后面的任何内容都应该重定向到另一个url,包括查询字符串

示例:http://:8080/dev/auth/dev/student/exam 应该重定向到 http://:8080/学院/学生/考试 如果url包含查询字符串,则还应在最后一个

ex: http://<myhost>:8080/dev/auth/dev/student/exam?internal=mepa&external=pega
should redirect to
    http://<myhost>:8080/college/student/exam?internal=mepa&external=pega
my url rewrite looks like
        <rule>
        <from>/dev/auth/dev/(.*)</from>
        <to type="permanent-redirect" last="true">%{context-path}/college/$1</to>
     </rule>
this is working fine for with out query strings
request you to help - with the rule for with query strings
ex:http://:8080/dev/auth/dev/student/exam?internal=mepa&external=pega
应该重定向到
http://:8080/学院/学生/考试?内部=mepa,外部=pega
我的url重写看起来像
/dev/auth/dev/(*)
%{context path}/college/$1
这在没有查询字符串的情况下运行良好
请求您帮助-使用查询字符串的规则
我尝试过这样的选择,但没有成功

 <rule>
        <condition type="query-string" operator="equal"></condition>
        <from>/dev/auth/dev/(.*)</from>
 <to type="permanent-redirect" last="true">%{context-path}/college/$1?%{query-string}</to>
     </rule>

/dev/auth/dev/(*)
%{context path}/college/$1?%{query string}

你在用什么编程语言?嗨,特雷弗-我在用Java