0

I made a site in php and when i visit it it shows a session id in the url.

http://pandhuishaaglanden.nl/wat_wij_verkopen.php?PHPSESSID=f4d91f171d85b4ccabbb8d06e29b7308

I dont know why or how, because google sees this a duplicate content in the SEO standaards.

Can someone please tell me what or how this is.

xec
  • 17,349
  • 3
  • 46
  • 54
Julez
  • 1,184
  • 2
  • 16
  • 23

2 Answers2

5

Thats to support browsers with deactivated cookies / without cookie support. PHP also supports session authentication via URL parameter (with session.use_only_cookies set to 0) instead of a cookie.

To disable it set session.use_trans_sid to 0 with ini_set. You also might wanna set session.use_only_cookies to 1 to be sure PHPSESSID in URL won't be used at all.

Louis Huppenbauer
  • 3,719
  • 1
  • 18
  • 24
  • okey this make sense but how do i change it so that it will not show the sesssion id in the url anymore – Julez Oct 24 '12 at 15:28
2

Add this line to your .htacess file:

php_flag session.use_trans_sid off

William The Dev
  • 505
  • 1
  • 6
  • 16