* *

Saturday, May 30, 2009

Disabling automatic session IDs in URLs>>

This has only happened to me once but I thought I'd mention it in case someone else has the same problem. Once I had a site hosted on someone else's server (always a problem waiting to happen) who had PHP configured to automatically append the Session ID to any URLs. Eg - in php.ini, the variable session.use_trans_sid was set to 1. This means when each webpage loaded, the server scanned all hyperlinks in the HTML and automatically appended the session ID to the end of the linked to URL. Not only does put a strain on server performance, it also can render your pages unindexable by search engines. To disable it, I started my PHP pages with this code: ini_set("session.use_trans_sid", 0);

No comments:

Post a Comment