Forum Moderators: coopster

Message Too Old, No Replies

Hide PHPSESSID

         

wfernley

4:01 pm on Apr 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi for some reason on one of my websites a PHPSESSID is shown sometimes in the URL. For example, product.html sometimes shows as product.html?PHPSESSID=20d397227fadb4339fe4dc5ad8c9adb8.

Now I am using a .htaccess file to have friendly URL's. But on my other sites they don't show a PHPSESSID in the URL. The main reason I want to use a .htaccess file is to get rid of the "?". Is there a way to remove this?

Thanks in advance for your help :)

Wes

Longhaired Genius

4:27 pm on Apr 21, 2005 (gmt 0)

10+ Year Member



This is one of the first questions I asked at Webmaster World. I can't remember who it was who gave me this snippet for my .htaccess:

<IfModule mod_php4.c>
php_value session.auto_start 0
</IfModule>

wfernley

4:41 pm on Apr 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Great. Thanks for the snippet :)

Wes

ergophobe

7:43 pm on Apr 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



you can also set php to not use url-based session IDs with the .htaccess directives:

php_value session.use_only_cookies 1
php_value session.use_trans_sid 0