Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

PHPSESSID and Silverstripe - solution


Reply

2 Posts   2063 Views

Avatar
BigJohn

12 January 2010 at 12:36am Community Member, 3 Posts

After releasing my site, PHPSESSIONID's appeared in my URL's. I removed them by adding the following lines in the php.ini file in my root:
session.use_only_cookies = 1
session.use_trans_sid = 0

Somehow that did the trick for normal browsers. Textbrowsers though (and Google!) still received the PHPSESSID in the url!

I tried a lot of things (lots and lots of tips on the net regarding .htaccess and php.ini) but finally found the answer (http://www.seomoz.org/ugc/removing-phpsessid-from-an-url). The trick was adding the lines to my config.php file, being the file _config.php in de mysite directory:
ini_set('session.use_trans_sid', 0);
ini_set(‘session.use_only_cookies’, 1);

No more PHPSESSID! Next step cleaning my listings in Google...
If you're struggling like I was, now you can find the answer on the forum.

Avatar
bellafaith

26 February 2010 at 7:43pm Community Member, 12 Posts

Thank you so much for posting your solution for removing PHPSESSID in the links!