Url Rewrite is redirecting rather than rewriting in backend

前端 未结 1 1530
故里飘歌
故里飘歌 2020-12-22 12:07

I thought that tuckey-urlrewrite-filter would rewrite the URL in the backend. So like if I typed in the address bar http://localhost:8080/TEST/some/yo I expect

相关标签:
1条回答
  • 2020-12-22 12:44

    I found the answer. Pretty simple actually. I needed to remove the type="redirect" that was on the example XML at the tuckey website. And I found that when redirecting, you have to add your context app in the to tag, but when not redirecting, you should not:

    <?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>/jspinwebinftest/?param=$1</to>
        </rule>
    </urlrewrite>
    
    0 讨论(0)
提交回复
热议问题