Tomcat base URL redirection

前端 未结 6 2162
太阳男子
太阳男子 2020-11-28 23:00

Using tomcat, how do I get a request for http://www.mydomain.com to redirect to http://www.mydomain.com/somethingelse/index.jsp ? i haven\'t even managed to get an index.htm

6条回答
  •  迷失自我
    2020-11-28 23:24

    Take a look at UrlRewriteFilter which is essentially a java-based implementation of Apache's mod_rewrite.

    You'll need to extract it into ROOT folder under your Tomcat's webapps folder; you can then configure redirects to any other context within its WEB-INF/urlrewrite.xml configuration file.

提交回复
热议问题