Problem with cookies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kalpesh
Forum Commoner
Posts: 54
Joined: Sun Sep 21, 2008 5:04 am

Problem with cookies

Post by kalpesh »

hi, I try to write application in which cookie is stored in browser.
I stored cookie in browser when i call index page.
But after i click on link of another page in same page ,
the cookie value i set in index page is changed after link in index page clicked.
But when i remove .htaccess file in root then it works fine.
As soon as i insert .htacces file the problem starts again.

The code in .htaccess is:

Code: Select all

 
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?([^/]+)/Category/([^/]+).html$  City/Category/Category.php?Cat_Id=$2&City=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?([^/]+)(/index.html)? City/Index.php?City=$1 
 
I dont know why this happening?
It is very strange.
Can any one have solution?
User avatar
akuji36
Forum Contributor
Posts: 190
Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut

Re: Problem with cookies

Post by akuji36 »

Post Reply