Php Session

Hi,

Current when i try to search on my web site using google, site:www.example.com

The URL in my website in the ending will have a www.example.com/?PHPSESSID=7e1c3c3e2aeae519e00261b3c7171262

How can i remove that? Please help, Thanks

You probably have session.use_trans_sid support enabled in your php.ini (or overwritten in a .htaccess or in your webserver config). This PHP feature was used to automatically append the session ID to every URL in the output, if cookies where not available. Use phpinfo() to find out. For added safety you can also set session.use_only_cookies to 1.

thanks got it, so the value should be 0?

and i have try .htaccess to change the value but when i try to do a search, site:www.example.com the phpsessid is still out?

any idea it is due the google?

You can also delete that directive from php.ini, if you have control over it, as this variable defaults to false.

I’m not sure if this is the issue and I suggest you examine the https headers closely while reproducing the problem. You’ll be able to get a good insight by looking at the header - who sends what, what ‘redirect’ headers you get, etc.