Carrying sessions on subdomains


I want to carry sessions from my main domain like to, but, i am unable to do it, i don’t want to make changes to php.ini file. So, i tried using:

ini_set(‘session.cookie_domain’, ’’); in my application, but, it didn’t work. So, i want to know , is there a way to achieve this using .htaccess file?

Please suggest!


You have an extra blank and dot in front of the domain name that shouldn’t be there.

Thanks for replying but i tried this as well:

ini_set(‘session.cookie_domain’, ‘’);

But, it didn’t work, that’s why i was trying to do it using .htaccess file.