Welcome to WebmasterWorld Guest from

Forum Moderators: buckworks

Message Too Old, No Replies

cookies and sub-directories

how to get cookies across directories

10:23 am on Aug 23, 2003 (gmt 0)

New User

10+ Year Member

joined:Nov 18, 2002
votes: 0


I've got an existing ecommerce site where all the product pages and buying pages are in the root directory.
The cookies that run the ecommerce side are consequently all set in the root directory.

The site is now being redeveloped and I want to use multiple directories for each of the product groups and another directory (but could be root) for the check and buy pages.

The problem I have is that the cookies get set afresh in each of the sub directories and the check and buy pages can't read them.

What I need is for the cookies to be set once in root and updated from the sub directory pages and then read from root by the check and buy pages.

Does anyone have any advice on how I might do this or a practical example of this I could look at so I know how to mode my existing system.



4:39 am on Aug 26, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 7, 2001
votes: 0

A cookie set to your specific domain with the path attribute set to '/' should be accessible to all the sub-directories within that domain. How are you setting your cookies?

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members