1571 posts
  • Helped protect Envato Market against copyright violations
  • Has sold $5,000+ on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Had an item featured in an Envato Pack
+4 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!

21 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

1571 posts
  • Helped protect Envato Market against copyright violations
  • Has sold $5,000+ on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Had an item featured in an Envato Pack
+4 more
WebSmacker says

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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by