Why doesn't encodeURL() work in Apache-Tomcat? It works fine with Tomcat standalone.

Alex Chaffee

To: tomcat-user@jakarta.apache.org
Subject: Re: P: session tracking * encodeURL
From: Jason Rumney <jrumney@ipo.att.com>
Date: 18 May 2000 14:38:58 +0100

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
separates 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>
        
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact