Reply to Re: Can you avoid that googlebot indexes PHPSESSID pages?

Your name:

Reply:


Posted by CAH on 04/06/06 16:22

> There was some discussion of forcing cookies, but the author didn't want
> to limit his users, so...
>
> How about doing something like this:
>
> // See if the user agent is Googlebot
> $isGoogle = stripos($_SERVER['HTTP_USER_AGENT'], 'Googlebot');
>
> // If it is, use ini_set to only allow cookies for the session variable
> if ($isGoogle !== false) {
> ini_set('session.use_only_cookies', '1');
> }

Hi Scott

The solution you have come up with, is the cool one. How can I test if
my host allows me to set ini_set('session.use_only_cookies', '1');
The way you suggest in your code? Can all do this on any host?
Any ideas as to how to chek to See if the user agent is Googlebot?

Thanks for the suggestions. I must say I have had my first encounter
with cookie problems, so I would like to get the PHPSESID back in the
url.

Best regards
Mads

[Back to original 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

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