URL REWRITE with&没有查询字符串

时间:2013-10-23 22:21:44

标签: java tuckey-urlrewrite-filter

使用带有tuckey的URLrewrite时遇到问题。我的要求就像     当url包含dev / auth / dev /之后应该重定向到另一个url,包括查询字符串

ex: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

我尝试了类似的选项 - 但没有工作

 <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>

0 个答案:

没有答案