Remove Session ID from URL

05/08/2010

This post explains how to disable the Session ID in URLs of your Magento web-to-print store.

Magento adds a SID at the end of the URL by default. It makes URLs cumbersome and may lead to corrupt screens and data.

Web-to-print session ID

Some features included in Magento web-to-print extension may not function correctly with a SID in the URL. We recommend to remove it.

Option 1 – Disable SID from Magento admin

Login to your Magento administration panel and navigate to System / Configuration / Web tab.

Web-to-print magento SID

Expand Session Validation Settings section and change Use SID on Frontend value to No.

Navigate to Magento homepage and click on any product. There should be no SID parameter in the URL. Proceed to Option 2 if SID is still there.

Option 2 – Edit App.php file

In some cases using option 1 does not work and Magento overwrites your settings. To ensure SID is disabled, you need to manually edit Magento’s App.php file. Navigate to app/code/core/Mage/Core/Model folder on your server and download the App.php file to your hard drive.

Open the file with a text editing application (Notepad, Notepad++ etc.).

web-to-print_edit_php_file

Change $_useSessionInUrl value from “true” to “false“.

Note. This value is reset to its default “true” value when Magento is upgraded. Remember to change it back to “false”.

See also: