You are here: PHPSESSID, Googlebot and .htaccess « PHP Programming Language « IT news, forums, messages
PHPSESSID, Googlebot and .htaccess

Posted by John Smith on 11/25/05 18:08

Googlebot has been picking up numerous PHPSESSID name/value pairs in
URIs at my website, and this causes duplicate hits and wasted bandwidth.
I've since prevented PHPSESSID generation in my PHP script if
Googlebot makes the request; like so:

if(preg_match("/googlebot/i", $_SERVER['HTTP_USER_AGENT']) != 1)
//session code here

....but this doesn't stop the PHPSESSID requests from Googlebot because
they're already stored in its database, and it continues to request
query strings like this one:

<hxxp://mysite.com/getdetails.php?personID=I23&tree=num1&PHPSESSID=e0489b957f2d336974ed7f2d71db2bab>

Therefore, I'd like to use modrewrite (in .htaccess) to permanently
redirect to the same page after stripping out the PHPSESSID name/value
pair..but I'm having great difficult in figuring out how to do this. (I
can strip it if it's the only name/value in the query_string, but not if
there are other name/values in there, as in the example above.) I now
wonder if it's even possible.

Yep, I've Googled exhaustively and you're better than me if you can find
a solution that way.
--
John

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация