.htaccess redirect -- what the heck am i doing wrong?

Never mind. I caught it now. Should have been:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.geektoyland.com$ [NC]
RewriteRule ^(.*)$ http://www.geektoyland.com/$1 [R,L]

DOH!

-Rich
 
Hmm I see no difference... What changed?

Like Bob said, town vs. land.

For the benefit of those interested: There are more than one way to do a redirect. You can specify that a visitor to a specific domain be referred to another domain, or that a visitor to any domain except a specific domain be referred to another domain. Sometimes I use one way, sometimes the other, depending on how many domains need to be redirected. In this case, I combined the two -- which causes an error -- because I was working on three sites at one time.

The correct .htaccess file entry in this case basically says, "If the visitor arrives at any domain except geektoyland.com, refer him to the corresponding page on geektoyland.com."

But what I originally wrote basically said, "If the visitor arrives at any site other than geektoytown.com, refer him to the corresponding page on geektoyland.com." That obviously caused errors when trying to open geektoyland.com, because it would never open (it would loop).

Just a dumb error. I'm gonna go take a walk. That helps when I start doing stupid things like this.

Incidentally, I've been trying to sell the two domains, but have had no takers; so I figgered I'd put an Amazon store back up on them (which is what they originally had there, anyway) and make a few bucks over the holiday season.

-Rich
 
Back
Top