【发布时间】:2014-05-15 07:41:50
【问题描述】:
我认为 tukey-urlrewrite-filter 会在后端重写 URL。因此,就像我在地址栏中输入 http://localhost:8080/TEST/some/yo 一样,我希望该地址保留在地址栏中,但在 Tomcat 的后端处理它,就好像我输入了 http://localhost:8080/TEST/jspinwebinftest/?param=yo 但它重定向到 http://localhost:8080/TEST/jspinwebinftest/?param=yo 并显示在地址栏中。
我怎样才能让它只在后端重写 URL?这是我的 urlrewrite.xml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN"
"http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">
<urlrewrite>
<rule>
<from>^/some/(.*)$</from>
<to type="redirect">/TEST/jspinwebinftest/?param=$1</to>
</rule>
</urlrewrite>
【问题讨论】:
标签: tomcat rewrite tuckey-urlrewrite-filter