1420 posts
    Has referred 10+ members Has sold $1,000+ on Envato Market Has collected 50+ items on Envato Market Had an item featured in an Envato Pack
+3 more
WebSmacker says
I have a PHP site that I’m building for a client, and before anyone can access any of the pages they must click OK to an agreement. I’m handling this by using a cookie and the following PHP code:
if (isset($_COOKIE['agreed'])) {
//validated code goes here
} else {
//not validated
header('Location: verify.php');
}

I’m assuming this will also send all search bots to the redirect page. How can I tell search bots to go ahead and enter the site, but only actual visitors get redirected? Thanks in advance!

20 posts
    Has referred 1+ members Has sold $10,000+ on Envato Market Has collected 10+ items on Envato Market Made it to the Authors' Hall of Fame
+3 more
MrPlugins says

write first page like redirect page ( you can hide its content with JS when a user enter on site) and add code for redirect in footer

1420 posts
    Has referred 10+ members Has sold $1,000+ on Envato Market Has collected 50+ items on Envato Market Had an item featured in an Envato Pack
+3 more
WebSmacker says

What if the person viewing the site has javascript disabled? Any way to handle this with server side code like php?

by
by
by
by
by
by