Only working on tomcat instance, not apache

10 views
Skip to first unread message

Wolf

unread,
Nov 9, 2009, 10:25:16 AM11/9/09
to UrlRewrite
I apologise if the solution to this is spectacularly simple.

Setup: Apache2 > Mod_JK > Tomcat

I'm trying to use UrlRewriteFilter to prettify URLs. The rules are
working fine when accessing the webapp via localhost:8080/webapp/path
(ie. the tomcat instance) but not when accessing the same webapp via
FQDN, eg. www.servername.com/webapp/path.

Does anyone have ANY idea why this is?

Thanks,

Wolf

Avlesh Singh

unread,
Nov 9, 2009, 12:17:41 PM11/9/09
to urlre...@googlegroups.com
Are you sure only the UrlRewriteFilter is not working?
Is context path correctly set in your tomcat's server config?
Do you have rules, in your urlrewrite.xml, based on host name?

Cheers
Avlesh

Wolf

unread,
Nov 9, 2009, 5:31:18 PM11/9/09
to UrlRewrite
There is only one rule:

<rule>
<from>^/customer/.*$</from>
<to>/page.jsp</to>
</rule>

It works as expected when accessing the tomcat instance directly on
localhost:8080, but if I access http://www.servername.com/customer/test
I get a 404.

Whether the context path is set correctly or not I can't say, except
to say that the webapp otherwise works fine.

On Nov 9, 5:17 pm, Avlesh Singh <avl...@gmail.com> wrote:
> Are you sure only the UrlRewriteFilter is not working?
> Is context path correctly set in your tomcat's server config?
> Do you have rules, in your urlrewrite.xml, based on host name?
>
> Cheers
> Avlesh
>

Avlesh Singh

unread,
Nov 9, 2009, 11:24:41 PM11/9/09
to urlre...@googlegroups.com
Copy-paste your filter definition in web.xml.

Cheers
Avlesh
Reply all
Reply to author
Forward
0 new messages