0

Is it possible to separate session on the same domain by looking based on a parameter in the url?

For example : mywebsite.com/mytheme1 has different session of mywebsite.com/mytheme2

Thank you

YoChappu
  • 23
  • 5

1 Answers1

0

You could namespace your sessions, by using different session names.

Here's an example that looks to see if a parameter is set in the URL, and changes the session name accordingly.

<?php

$name = isset($_GET['foo']) ? 'foo' : 'bar';
session_name($name);
session_start();

You could have different session mechanisms, utilising a similar strategy.

Progrock
  • 7,373
  • 1
  • 19
  • 25