Have a look at: http://tomcat.apache.org/connectors-doc/reference/apache.html
especially the directive JkWorkerIndicator. If you combine SetHandler jakarta-servlet (this tells apache to let mod_jk handle the request) with setting the environment variable whose name ist set via JkWorkerIndicator to t1 or t2 depending on the request, you can determine the forwarding target during runtime. Your last task would be combining this with your existing rewrite rule and finding out, if there is a good way of combining the rewrite with setting the variable to an the appropriate value. Like: first check the URL and set the variable t t1 or t2 depending on the URL, then aply your rewrite rule and let mod_jk handle the result by setting sethandler. The feature is exlained in more detail a little down the page. It has been introduced in mod_jk 1.2.19, so you would need a relatively recent version of mod_jk. Have fun, Rainer [EMAIL PROTECTED] schrieb: > Hi, > > > I have a webapp "/app" installed on 2 Tomcat servers : one server is > production "t1" and the other, "t2", is development. > > How can I, from a single apache (httpd) server, in a single virtualhost, > redirect /app to /app on t1 and /app_dev to /app on t2 ? > > > I tried the following but /app is then redirected to t2... : > > JkMount /app/* t1 > > RewriteRule ^/app_dev/(.*)$ /app/$1 [PT] > JkMount /app/* t2 > > NB : I can't use mod_proxy_ajp, and I'd prefer not to add an another context > path on tomcat... > > A more direct question : is there a way to rewrite rules into mod_jk process ? > > > Thanks for helping, > > Romain > > > -- > This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com > http://www.opensubscriber.com/messages/users@tomcat.apache.org/topic.html > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]