views:

178

answers:

2

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?

+1  A: 

Why should you "want to make new visitors" go through the splash page?

Listen to Google, your visitors or any usability guru, and they'll tell you to dismiss your splash page plans.

You don't need one home page. You need a hundred or a thousand. And they're all just as important.

http://sethgodin.typepad.com/seths_blog/2007/05/blow_up_your_ho.html

or

The premise is simple: every page of your Website must now be considered a homepage. The hours spent tinkering on your current homepage needs to shift into ensuring that every page is a brilliant representation for the keywords and external links that drove someone to your site. Fewer and fewer consumers are coming in via the homepage. They could also care less about what your company does or the other products you sell. They were searching for something specific, and if it's not there after they've clicked on a search result link, they're you're roadkill on the information super highway.

http://www.twistimage.com/blog/archives/every-page-is-your-homepage/

Fh
It's more that my client wants to have a splash page, and I think it's a waste of time if google doesn't index it.
Eric
Well, that's another question. In your original question you also asked "(or alternatively why it shouldn't be done)", but I see that you removed those words afterward.
Fh
Well I have two answers to that bit. It's just that I'd like to know whats wrong with the htaccess. By removing the "(or alternatively why it shouldn't be done)" I'll get the answer I was really looking for.
Eric
A: 

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:

  1. Sink the Splash Page
derobert