Jump to content

lost session with subdomain


Frank Vèssia
 Share

Recommended Posts

Hi,

I'm using a code to create fake subdomains that are pw pages. 

RewriteCond %{HTTP_HOST} ^(page1|page2|page3)\.example\.com$
    RewriteRule (.*) /main-page/%1/$1


The code works pretty well but when i browse the subdomain i lost the session if i'm loggedin. Any idea to avoid this problem?
Link to comment
Share on other sites

I tried to add the first line of this code with the other ini_set of the index.php file....no luck

    ini_set('session.cookie_domain', '.mydomain.com');
    ini_set('session.use_cookies', true); 
    ini_set('session.use_only_cookies', 1);
    ini_set("session.gc_maxlifetime", $config->sessionExpireSeconds); 
    ini_set("session.save_path", rtrim($config->paths->sessions, '/'));
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...