How to remove PHPSESSID from URL?
You can remove PHPSESSID from URL by changing session.use_trans_sid value in php.ini, .htaccess (Apache) or in PHP code.
In php.ini set the value of session.use_trans_sid to 0
session.use_trans_sid = 0
In .htaccess
php_value session.use_trans_sid 0
In PHP code set the use_trans_sid value to false like below
ini_set('session.use_trans_sid', false);