This page contains snippets of information that may help you to configure Magento to suit your needs.
Remove SID from Magento URLs
Magento will append a SID (session ID) to URLs if the url does not match what is set in admin. Thus, if you access the site without the WWW when the Magento config stipulates that WWW is used, you will see this SID.
Mod rewrite can be used to redirect all non-www traffic to the www version - however, you may find this does not work for you. If this is the case, you can over-ride the file which appends the SID to the link. This is a safe way of making changes to Magento, whereby future upgrades will not break this change.
To stop Magento from appending the SID to urls, build the following directory structure under your Magento install:
Copy the following file into the Session directory created in the previous step: