Session variables are not persisting between page loads

前端 未结 11 1460
梦谈多话
梦谈多话 2020-12-10 11:12

Can someone tell me why the session vars are not passing between pages? They were working up to 2 days ago. Now its not? There is a third party system that logs users in b

11条回答
  •  一个人的身影
    2020-12-10 11:29

    it's not the hosting server issue...

    check your URLs

    if a user is login under "example.com" session will be stored for "example.com" and not "WWW.example.com" so if a link goes to www.example.com it will not have that session.

    you can use htaccess to always set the url to "WWW.example.com" use below code for it

    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^hemantjadhav.com$ [NC]

    RewriteRule ^(.*)$ http://www.hemantjadhav.com/$1 [L,R=301]

    (replace hemantjadhav with your domain name)

提交回复
热议问题