1832 posts
  • Beta Tester
  • Trendsetter
  • United States
  • Copyright Ninja
+6 more
plugindistrict
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!

21 posts
  • Affiliate Level 2
  • Author Level 5
  • Collector Level 2
  • Trendsetter
+4 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

1832 posts
  • Beta Tester
  • Trendsetter
  • United States
  • Copyright Ninja
+6 more
plugindistrict
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