Please help me remove session id

Discussion in 'PHP' started by 530, Mar 16, 2007.

  1. #1
    Hi,

    My site was ranking very good with html pure pages, one day I need to integrate comment script on each html page but I don't want to change file name extension so I use this code in .htaccess

    AddType application/x-httpd-php .htm
    AddType application/x-httpd-php .html
    Code (markup):
    to parse PHP value under html extension filename and. I am not sure if it's related but from that day I found my urls sometimes they have been generated with PHPsessionid included with them but sometimes not. However, search engine bots crawl them and my ranking plump down like a rock. How can I fix this problem. Please give me suggestion.
     
    530, Mar 16, 2007 IP
  2. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Add the following to your .htaccess file
    php_flag session.use_trans_sid off
    Code (markup):
     
    Aragorn, Mar 16, 2007 IP
  3. 530

    530 Banned

    Messages:
    124
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you very much. It's work like a charm :D
     
    530, Mar 16, 2007 IP
  4. kobra

    kobra Member

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    Yep that's how I do it just add the code into .htaccess file.
     
    kobra, Mar 16, 2007 IP
  5. Aragorn

    Aragorn Peon

    Messages:
    1,491
    Likes Received:
    72
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Turning off session id has a negative implication. If your users browser doesn't support Cookie, then your session management will fail.
     
    Aragorn, Mar 17, 2007 IP
  6. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #6
    To add to that... search engine crawlers generally do NOT support cookies: this is normally not a problem but if your site layout / 'flow' is dependent on sessions, this will affect the way search engines crawl your site.
     
    TwistMyArm, Mar 17, 2007 IP
  7. 530

    530 Banned

    Messages:
    124
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks for all suggestion :D I think it will not have problem because my site is only text content with html pages. No scripts embeded now - I remove all of them already.
     
    530, Mar 18, 2007 IP