| 
	
 | 
 Posted by Scott on 04/04/06 04:54 
On Mon, 2006-04-03 at 01:20 -0700, CAH wrote: 
> Hi 
>  
> Can you avoid that googlebot indexes  PHPSESSID pages? Googlebot is 
> indexing pages with  PHPSESSID, which makes it think my page has a 
> infinite number of pages. How can one avoid this? 
>  
> Here is an exsample of url that google register, that might make is 
> more clear what is happening 
>  
> www.winches.dk/winches.php?artnr=500735&PHPSESSID=d22126f0d46334659ff... 
> www.winches.dk/winches.php?artnr=500735&PHPSESSID=95fc5b6aed41fc142ea... 
>  
> I do use session registred ID, but if I visit my site I never see those 
> kind of urls? So how come google gets a hold of them? 
>  
> Best regards 
> Mads 
>  
 
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'); 
}
 
  
Navigation:
[Reply to this message] 
 |