Jump to content

Recommended Posts

hi, i try to store cookie value.

In index page the cookie value stored properly.

 

But whenever i go to second page from index page

the cookie value changes.

This is very strange problem.

I don't know why this happening.

 

But then i find Cookie value changing because of .htaccess file.

When i remove that file from root and then it works fine but when i add .htaccess file  and try to visit links in index page,cookie value change.

RewriteEngine on
Options +FollowSymlinks
RewriteRule ^/?([^/]+)/Category/([^/]+).html$  City/Category/Category.php?Id=$2&City=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?([^/]+)(/index.html)?  City/Index.php?City=$1

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/140917-htaccess-file-changing-cookie-value/
Share on other sites

hmmm, i personally cannot find anything in that ht access file that could alter a cookie.

 

How does the value change? in what way? have u tried renaming the cookie, tried any test cookie scripts? does it do it with sessions? and lastly make sure there is no avascript or other codes included in this page that could cause this problem.

I rename the cookie but it still changing value.

The Cookie Storing City Name as value.

The value change from City Name to folder name like logo

When I go to second page which is product page from index page the value stored in cookie is logo.

And what is avascript?

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.