[users@httpd] URL rewriting and cookie paths (rewritable?); loss of session information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm using httpd 1.3.34 with mod_rewrite and am having problems with
cookies.

- Before URL rewriting:
My application generates a cookie with a path (e.g. /myapp).  This
works fine when there is no URL rewriting, and when all URLs to my
application have /myapp in the path (e.g. http://..../myapp/page1 or
http://..../myapp/page2).

- After URL rewriting:
I am rewriting URLs from /myapp/User?id=johnny (real URL) to
/user/johnny (what users see in the browser).
When a URL is rewritten, there is no '/myapp' any more, and my cookies
don't get sent (from browser to the server), since the paths don't
match.  Since these cookies hold my session information (think
jsessionid=34tgy74848 type of stuff), my session information gets lost.


I think the problem would be solved if mod_rewriting also rewrote
Cookie paths.  If this is the original cookie (Set-Cookie HTTP response
header):

  Set-Cookie: JSESSIONID=1ftmqr67vvnld;Path=/myapp

I would love to be able to tell mod_rewrite to rewrite '/myapp'
_cookie_ path to, say, just '/'.


- Questions:
Is this doable (in 1.3.*)?
Is this doable in 2.0.*?

Any help would be veeeeeeeeeeeeeery appreciated.

Thank you,
Otis

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simpy -- http://www.simpy.com/ -- Find it. Tag it. Share it.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux