You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jo...@mn.man.de on 2000/05/18 14:48:44 UTC

P: session tracking * encodeURL

Hello,

i use the methode encodeURL for rewriting URLs. It's working, if i use tomcat
standalone, but it doesn't work in the apache-tomcat environment.

Has anybody else seen this effect? Is there a workaround (i won't use cookies)?

Yours Johannes


Re: P: session tracking * encodeURL

Posted by Jason Rumney <jr...@ipo.att.com>.
Johannes_Lorenz@mn.man.de writes:

> Hello,
> 
> i use the methode encodeURL for rewriting URLs. It's working, if i use tomcat
> standalone, but it doesn't work in the apache-tomcat environment.
> 
> Has anybody else seen this effect?

The problem is that Apache does not recognize the semicolon that
seperates the session id from the rest of the URL as being anything
special, so rules based on file extension for example, won't match
properly.

> Is there a workaround (i won't use cookies)?

I have the following rewrite rule in my apache config to fix this:


  <IfModule mod_rewrite.c>
      RewriteEngine	on
      # Force URLs with a jsessionid to go to Tomcat. Necessary because
      # Apache doesn't recognise that the semi-colon is special.
      RewriteRule	^(/.*;jsessionid=.*)$	$1 [T=jserv-servlet]
  </IfModule>


-- 
Jason Rumney <jr...@ipo.att.com>
AT&T Labs (Redditch, UK)