Search code examples
phpapache.htaccess

Trying to change session.name in htaccess, remains as PHPSESSID


I've put the following into an .htaccess file:

php_value session_name SSOSESSID

Just to confirm, the .htaccess is being picked up (I tested with a simple redirect, and it worked ok) and in the virtual host apache config file AllowOverride is set to All. So this part seems fine.

Anyway I can also confirm I've restarted apache but when I check the phpinfo() output the session.name is still PHPSESSID.

Is there anything else I've missed out here? Thanks


Solution

  • Try with below line in your .htaccess :

    php_value session.name "SSOSESSID"