Jump to content

.htaccess file changing cookie value


Kalpesh77

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?

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.