1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How can I hide ?PHPSESSID=65e9cc7bf996

Discussion in 'PHP' started by dct, Aug 3, 2005.

  1. #1
    I've just noticed that one of my sites is displaying the a php session id at the end of the url, like:
    ...com/?PHPSESSID=65e9cc7bf996...
    Code (markup):
    Is there any way I can prevent this, like using cookies instead of the URL?

    Sessions are only used to see if the site is in admin mode (passworded) so they shouldn't be needed or visible to spiders or normal visitors.

    Thanks in advance
    SEMrush
     
    dct, Aug 3, 2005 IP
    SEMrush
  2. WhatiFind

    WhatiFind offline

    Messages:
    1,789
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    180
    #2
    include this piece of code into your pages:
    ini_set('session.use_trans_sid', false);
    Code (markup):
    Or you can use it in .htaccess by this code:
    php_flag session.use_trans_sid off 
    Code (markup):
     
    WhatiFind, Aug 3, 2005 IP
    dct likes this.
  3. nohaber

    nohaber Well-Known Member

    Messages:
    276
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    138
  4. dct

    dct Finder of cool gadgets

    Messages:
    3,134
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #4
    Cheers guys, appreciated.
     
    dct, Aug 3, 2005 IP