header
 
     
 
pixel
pixel pixel

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);

Unhelpful Helpful Rating 2.1 (score out of 5, no. of ratings: 7)
Comments
Comment by Seandy on 2005-07-20
Thanks, it helps me a lot! :)

Comment by Lisa on 2011-08-17
Gee whiz, and I tuhoght this would be hard to find out.

Post a Comment
Name
Email
(optional)
Comment
RatingUnhelpful Helpful
Security Image* (this is just to prevent spam submissions)
Security Image