How to Remove PHPSESSID

Insert the following code into .htaccess to remove session IDs from your website URLS

php_value session.use_only_cookies 1
php_value session.use_trans_sid 0

This code tells the server to store the PHPSESSID in a cookie or not to bother. If the browser does not have cookies enabled, then the session id won’t move to the URL. This does mean that all functionality that relies on sessions will not work such as session based logins.

Leave a Reply

You must be logged in to post a comment.