tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Rees" <>
Subject Re: mod_jk and virtual folders?
Date Wed, 04 Feb 2004 20:26:26 GMT
On Wed, February 4, 2004 1at 2:02 pm, Tim Diez wrote:
> I'd like to use apache and mod_jk to dynamically re-route all subfolders
> of my httpd web server to a single Tomcat webapp.
> The tricky part for me has been setting this up to be dynamically
> routed.  What I'd like to do is have<anyfolder> route to
> myserver:8080/mywebapp, so I don't have to create a virtual host for
> every potential subfolder on
> So, I need*/ to map to
> I need the url to always keep the original host/folder.  I tried
> mod_rewrite, but it changes the URL after the redirection.  If I use
> mod_jk any folders off of the default port 80 server have to co-exist as
> a webapp under tomcat(as far as I know).

You'll have to use mod_rewrite for this, and you'll have to make sure that
you're using internal redirects (or forwards) instead of exernal
redirects.  This will require that you have mod_proxy installed as well.

So something like this may work:

RewriteEngine on
RewriteRule ^/(.*)/(.*)$$2 [P,L]

What rewrite config did you try before?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message