Forum Moderators: coopster

Message Too Old, No Replies

How to not use PHP session IDs in URL

How can I not have to use PHP session IDs in the URL?

         

krt1

11:05 am on May 17, 2005 (gmt 0)

10+ Year Member



How can I not have to use PHP session IDs in the URL?
I have tried putting:
ini_set('session.use_only_cookies',1);
ini_set('session.use_trans_sid',0);
before session_start

And I have also tried
php_value session.use_trans_sid 0
php_value session.use_only_cookies 1
in .htaccess

However, both attempts have failed and I am left with pages with SIDs that are penalised by search engines.

Thanks,
Taner

krt1

11:45 am on May 23, 2005 (gmt 0)

10+ Year Member



*bump*

No help?

cyhcto

3:44 pm on May 23, 2005 (gmt 0)

10+ Year Member



Try calling:

ini_set('url_rewriter.tags', '');

On the pages which have links you don't want the SID appended on to. It works for me...

Also, as I read the docs at [us2.php.net...] it appears that the session.use_trans_sid should be set to true or 1 to actually use a transparent session ID (keep it out of the URL). I could be wrong though... hope things work out for you.

krt1

10:31 pm on May 23, 2005 (gmt 0)

10+ Year Member



haha... must be one of them times when you spend all this time looking through your code only to realise a tiny mistake like that!

Thanks for the help!

[PROBLEM SOLVED]