Help in removing session IDs

Discussion in 'Programming' started by jbladeus, Oct 1, 2006.

  1. #1
    I have this session id issue on a site and a friend googled the following code to resolve this issue:

    In .htaccess:
    _________
    RewriteCond %{HTTP_USER_AGENT} "Google" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Slurp" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "MSNBOT" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "teoma" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "ia_archiver" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Scooter" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Mercator" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "FAST" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "MantraAgent" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "Lycos" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "ZyBorg" [NC]
    RewriteCond %{QUERY_STRING} SESSIONID
    RewriteRule ^(.*)$ $1? [L,R=301]
    ___________

    Can anybody comment on the above whether this code is correct and is the proper way to resolve the issue?
     
    jbladeus, Oct 1, 2006 IP