Magento remove session id from URL
Magento displays session ID in url, something like:
http://loca.lho.st?__SID=2wewesfdgfsdm
You can remove this in two ways:
1. Go to your Magento admin panel > System > Configuration > Web.
Under Session Validation Settings, set “No” against label “Use SID on the Frontend”.
If this doesn’t work, then move to option two below.
2. Edit the file at app/code/core/Mage/Core/Model/App.php (somewhere around line 222),
protected $_useSessionInUrl = true;
Change that value to “false”. That should now prevent session IDs appearing in URL.