Disabling automatic session IDs in URLs

Disabling automatic session IDs in URLs

One important point we have to consider while launching our web sites. When our site hosted on someone else’s server, 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. This ,may affect our server performance and also can render our pages unindexable by search engines. To disable it, We need to script our PHP pages with this code:

ini_set(”session.use_trans_sid”, 0);

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.