I use a session to maintain some variables between different pages on my site. Although it works great when switching from www.example.com/a to www.example.com/b, session variables are lost if I switch from example.com/a to www.example.com/b
Any idea how I can make sure the session is supported regardless of www or not www?
The website adds WWW as it moves to different pages, but pages are available without it. Therefore, if someone manually enters the address and omits this part, and then go to page b (by clicking the link or submitting the form), the session variables are lost.
source
share