Thank you for the reply, I have played around with mod_rewrite, just can't seem to get it going. I will have to dig deeper.
The main problem is when we used jserv we did something like this: ApJservMount /myApp/servlets /myApp ApJservMount /demo/myApp/servlets /myApp So myApp was a zone, and they paths would be "mounted" to the same zone But now, with mod_jk I can't do: jkMount /myApp/* worker1 JkMount /demo/myApp/* worker1 Because tomcat on the other end will expect two separate contexts: <Context path="/myApp" docBase="MyApp" debug="0" reloadable="true" /> <Context path="/demo/MyApp" docBase="myApp" debug="0" reloadable="true" /> Two separate webapps = a session headache. Unless I am missing something... -----Original Message----- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 11:35 AM To: Tomcat Users List Subject: Re: [Apache2.2.4/modjk/Tomcat6.0.13] redirect url problem Hi Dan, OK, two problems here: 1) URL encoded session ids and forwarding. I assume you are using mod_jk 1.2.23. For this problem you already found a workaround, although the JkOption is not really safe. This topi will be fixed in a nicer way in the forthcoming version 1.2.24. The reason you can not see the difference in the access logs is, that the access logs show the incoming URL, but not the forwarded URL. Apache httpd will decode %3b into ";" and mod_jk will reencode before forwarding, but unfortunately the tomcat connector doesn't understand %3b in front of jsessionid. The JkOption you have chosen will forward the decoded URL. 2) Redirects for POST requests result in GET requests I remember, that this is a well known browser problem. Maybe other users can help on that topic. Easiest solution would be to redirect earlier, i.e. before the form comes into the game. Another option would be to use mod_rewrite to rewrite the URL only locally, but then the browsers would not "learn", that they are using a wrong URL. Regards, Rainer Dan Beaulieu wrote: > > I am trying to migrate our current system of apache/jserv to apache tomcat > using modjk. I am trying to shoe horn our current configuration. > > I have a webapp lets call it myApp. Now some of our static content, beyond > my control, requests urls like > https://localhost/demo/myApp/servlets/aServlet;jsessionid=XXX. > I've added an entry in my httpd.conf: > > Redirect /demo https://localhost > > When I do this, I will get a 404 with the access_log saying: > > "POST > /demo/myApp/servlets/aServlet;jsessionid=24C7A06037BBA7AF7BB44DE5C0206F8C&Re > questType=SomeRequest HTTP/1.1" 301 332 > "GET > /myApp/servlets/aServlet%3bjsessionid=24C7A06037BBA7AF7BB44DE5C0206F8C&Reque > stType=SomeRequest HTTP/1.1" 404 1273 > > So, it looks like partly a url encoding problem. I searched around to find > out whats up, and tried this directive for mod_jk: > > JkOptions +ForwardURICompat > > And now in the access_log I see this > > "POST > /demo/myApp/servlets/aServlet;jsessionid=7B08C6CF734771A220CC98D82DE33466&Re > questType=SomeRequest HTTP/1.1" 301 332 > "GET myApp/servlets/aServlet > %3bjsessionid=7B08C6CF734771A220CC98D82DE33466&RequestType=SomeRequest > HTTP/1.1" 200 29 > > So we see that the request worked(even though the url is still encoded??), > but its not actually redirecting the request. The POST is getting turned > into a GET. Tomcat is responding with the proper response for a GET request > to "/myApp/servlets/aServlet". --------------------------------------------------------------------- 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]