Re: Search engines and cookies
| From: | Daniel Brown | Date: | Mon, 07 Apr 2008 14:29:19 +0000 |
| Subject: | Re: Search engines and cookies | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272625@lists.php.net to get a copy of this message | ||
On Mon, Apr 7, 2008 at 9:29 AM, Emil Edeholt <emil@knmedical.se> wrote:
> Hi,
>
> Do you guys how search engines like cookies? One site I'm working on now
> requires the user to select which region he/she is from on the start page.
> That value is stored in a cookie. So without cookies you can't get past the
> start page. Does this leave the search engines at the start page? Right now
> google only index the start pages on my site and I'm trying to figure out
> why.
>
> If I can't use cookies, how would you force users to select a region but
> letting the search engine spiders in on the site somehow?
One way to do it would be to allow Google (and/or other search
engines) to access the site by bypassing the region-selection
entirely.
<?php
if(preg_match('/Google/Uis',$_SERVER['HTTP_USER_AGENT'])) {
// Allow Google to pass through.
}
?>
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!