【问题标题】:Beautify hyperlink using urlrewriterfilter使用 urlrewritefilter 美化超链接
【发布时间】:2013-10-09 03:42:13
【问题描述】:

我正在尝试使用 urlrewriterfilter 从一个 URL 重定向到另一个 URL

<rule>
<from>/abc</from>
<to type="redirect">http://google.com</to>
</rule>

我从 localhost 运行我的程序,问题是我不知道为什么它会生成一个看起来像这样的超链接:http://127.0.0.1http://google.com

【问题讨论】:

    标签: java url redirect


    【解决方案1】:

    尝试将此规则移动到规则链的顶部并添加“last”属性。

    ^/ABC http://google.com

    【讨论】:

    • 它没有用。你知道如何从生成的 url 中删除上下文路径
    • 我仍然认为规则链的其他部分可能会搞砸你,编辑我的答案。
    猜你喜欢
    • 2020-06-26
    • 1970-01-01
    • 2011-06-09
    • 2011-03-24
    • 1970-01-01
    • 2012-07-20
    • 2013-08-29
    • 2018-09-20
    • 2011-07-02
    相关资源
    最近更新 更多