How does one keep a Drupal session alive across two different URLs?


I have the same drupal 7 installation running on:


Or perhaps, another way to imagine the problem is, supposed I have two sites:


Most people redirect to But if you had to have them both enabled, and they run the same drupal installation, and you log into one of them, it won’t mean you are logged into the other.

Since is running the same code as, or another example, having running the same code as, I want the user to remain logged in when he switches from one to the other.

I assume Drupal stores the user’s session id and when you switch to the other site, you get a new session_id, but surely there has to be a way to make the two aware of each other, so that you can allow the user to remain logged in across two sites?

قالب وردپرس