homepage Welcome to WebmasterWorld Guest from 54.161.155.142
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
mod_rewrite eats my cookies!
TwinkleToes




msg:1512613
 6:20 pm on Jan 10, 2003 (gmt 0)

A classic tabloid headline, no?

I have a module which uses a temporary cookie to store the session ID.

The URL host/module/info shows me the current ID as a web page.

I use the following rules for mod_rewrite:

RewriteRule ^/info$ /module/info [PT,L]

RewriteRule ^/$ /module/info [PT,L]

If I browse to host/, I get the same session ID every time I refresh (good!)

If I browse to host/info, I get a _new_ session ID every time I refresh (not good!)

Is mod_rewrite screwing up or removing the cookie?
Or is the cookie dependent on the URL? If so, why does it work for the root path?

Bryan

 

jdMorgan




msg:1512614
 7:55 pm on Jan 10, 2003 (gmt 0)

TwinkleToes,

Probably an interaction with mod_dir. mod_dir provides the name of the index file if one is not specified in the URL, such as the case where domain.com/ is requested, and appends a trailing slash when the request contains only domain.com or domain.com/directory_name with no trailing slash. This is done with a redirect, but I'm not sure how it will interact with the agent (program or module, you didn't say) which issues your cookies.

Jim

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved