PHPSESSIONID, how to get rid of it?

Discussion in 'PHP' started by MikeSwede, Jul 18, 2006.

  1. #1
    It seems that Google are having problems with my sessionID's generated from php and I'd like to know if there is a way to get rid of it if it is a bot that "reads" your pages?
     
    MikeSwede, Jul 18, 2006 IP
  2. phper

    phper Active Member

    Messages:
    247
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    There's a PHP configuration called session.use_only_cookies, which in your case is probably set to "0". Try setting it to "1".
     
    phper, Jul 18, 2006 IP
  3. Boby

    Boby Peon

    Messages:
    207
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Boby, Jul 18, 2006 IP
    jkjazz likes this.
  4. indianseo

    indianseo Peon

    Messages:
    208
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can identify bots by their User Agent Strings. Code in such a way that session id will not be served to bots.

    It needs some minor coding in some cases, may be complex.. I dont know which system you are using.
     
    indianseo, Jul 18, 2006 IP
  5. Boby

    Boby Peon

    Messages:
    207
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes bot can see the PHPSESSID, just check Google to see how many sites are indexed this way.
    Best it would be if you disable the session ID for everyone, no matter if human or bot.
     
    Boby, Jul 18, 2006 IP
  6. jkjazz

    jkjazz Peon

    Messages:
    1,717
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hey Boby, thanks for the tip.

    I had a long question here, but I just added your code to my .htaccess file and it works perfectly AND I can still login and stay logged in from page to page!

    Thank you for the great tip!

    Green rep added!

    John

     
    jkjazz, Jul 20, 2006 IP
  7. Boby

    Boby Peon

    Messages:
    207
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Glad it helped you :)

    Boby
     
    Boby, Jul 20, 2006 IP