1817 posts
  • Had an item that was trending
  • Located in United States
  • Helped protect Envato Market against copyright violations
  • Has sold $10,000+ on Envato Market
+5 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
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item that was trending
+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

1817 posts
  • Had an item that was trending
  • Located in United States
  • Helped protect Envato Market against copyright violations
  • Has sold $10,000+ on Envato Market
+5 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