【问题标题】:How to redirect Domain Name in java如何在java中重定向域名
【发布时间】:2013-11-19 10:44:01
【问题描述】:

我想将用户的请求网址(如http://site/a/index.html)重定向到http://a.site/index.html。并进一步保持用户浏览器的 url 不变。 urlrewrite(http://www.tuckey.org/urlrewrite/) 支持这个吗?我应该如何实现这个? 我需要更改 url,因为我无法更改 DNS 服务器。 谢谢!

【问题讨论】:

标签: java url-rewriting tuckey-urlrewrite-filter


【解决方案1】:

它应该可以工作,因为它声称是 mod_rewrite 的 JSP 等价物。另外,如果你想将http://site/a/index.html重定向到http://a.site/index.html,你可以使用HTTP重定向,或者只是一个简单的

<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-09-21
    • 2020-02-01
    • 1970-01-01
    • 2015-11-02
    • 2012-11-17
    • 2021-11-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多