Basically, my client wants to make new visitors enter the site I’m working on through the splash page. Unfortunately, Google indexed the home page. So no one ever actually sees the splash page. Is there a way that I can make a .htaccess file create a cookie in the viewers browser that says “I’m not new” (or maybe showsplash=false). Then the .htaccess could check if the cookie exists, and if not, load the splash page. Here’s my code:
Options +FollowSymLinks
RewriteEngine on
# Redirect to the splash page if new visitor
RewriteCond %{HTTP_COOKIE} !^.*show_splash=false.*$ [NC,R]
RewriteRule .* %{HTTP_HOST}
# If it's a new visitor, set the cookie
RewriteCond %{HTTP_COOKIE} !^.*show_splash=false.*$ [NC]
RewriteRule .* - [CO=show_splash:false:%{HTTP_HOST}]
I’m not convinced that this is either right or efficient. Anyone know how it should be done?
Well, first off, you’re going to lose any visitor who doesn’t have cookies enabled, as they’re going to keep getting redirected to the splash page.
Second, unless your splash page has useful information — instead of, say, just a flash animation — Google is giving you a hint, to just get rid of it. You need to ask yourself: why did the user come to my site? Is his/her goal best served by the splash page, or my home page?
Random reference: