与 tukey 的 URLrewrite 一起使用时遇到问题。我的要求就像当 url 包含 dev/auth/dev/ 时,应该将其后的内容重定向到另一个 url,包括查询字符串
例如: http://:8080/dev/auth/dev/student/exam 应该重定向到 http://:8080/college/student/exam 如果 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>