httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Lamborne <p...@maniatv.com>
Subject [users@httpd] Losing session -- mod_rewrite
Date Fri, 06 Jan 2006 20:59:36 GMT
Check this out:

I have two rewrite rules, basically going to the same place (same context):

RewriteRule ^/pub/?(.*)      ajp://dev3:8009/pub/$1 [QSA,P,L]
RewriteRule ^/pub-test/?(.*) ajp://dev3:8009/pub/$1 [P,QSA,L]

The 1st one maintains session (tomcat backend), the 2nd does not, 
generating a new session with each request.

So if the rewrite rule does not mask the Tomcat context, everything is 
good, but if it does session gets lost.

The cookies that Tomcat is setting all say /pub, which is what I want.

Apologies if this is one for the tomcat-user list, but I figure this is 
likely a problem folks from this list can help me solve.

I messed around with [PT] and an Alias rule, to no avail.  Hoping this 
one is easy and obvious for someone.

Rewrite log follows, in case it helps at all.
pete

10.1.10.82 - - [06/Jan/2006:13:56:49 --0700] 
[dev2/sid#862bac0][rid#86e3060/initial] (2) init rewrite engine with 
requested uri /pub-test/test1.jsp
10.1.10.82 - - [06/Jan/2006:13:56:49 --0700] 
[dev2/sid#862bac0][rid#86e3060/initial] (3) applying pattern 
'^/servlets(.*)' to uri '/pub-test/test1.jsp'
10.1.10.82 - - [06/Jan/2006:13:56:49 --0700] 
[dev2/sid#862bac0][rid#86e3060/initial] (3) applying pattern 
'^/video/?(.*)' to uri '/pub-test/test1.jsp'
10.1.10.82 - - [06/Jan/2006:13:56:49 --0700] 
[dev2/sid#862bac0][rid#86e3060/initial] (3) applying pattern 
'^/pub-test/?(.*)' to uri '/pub-test/test1.jsp'
10.1.10.82 - - [06/Jan/2006:13:56:49 --0700] 
[dev2/sid#862bac0][rid#86e3060/initial] (2) rewrite 
'/pub-test/test1.jsp' -> 'ajp://dev3:8009/pub/test1.jsp'
10.1.10.82 - - [06/Jan/2006:13:56:49 --0700] 
[dev2/sid#862bac0][rid#86e3060/initial] (2) forcing proxy-throughput 
with ajp://dev3:8009/pub/test1.jsp
10.1.10.82 - - [06/Jan/2006:13:56:49 --0700] 
[dev2/sid#862bac0][rid#86e3060/initial] (1) go-ahead with proxy request 
proxy:ajp://dev3:8009/pub/test1.jsp [OK]


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message