【发布时间】:2011-10-01 16:12:48
【问题描述】:
我想自动将http://example.com 的请求重定向到http://example.com/SomePage
我可以通过以下规则使用 Apache 做到这一点:
RewriteRule ^/$ /SomePage [R]
但是,我的一些服务器不运行在 Apache 之上,只运行在 Tomcat 之上。如何在 web.xml 中实现等价物? SomePage 是一个 struts2 动作。
【问题讨论】:
标签: jsp tomcat servlets url-rewriting friendly-url