Hello,

Google hates me. Of this, I am certain. Apparently, I've made things worse as my site has both a .net and .com address. I had originally developed the site in a .net folder, then pointed the .com url to said folder, and called it a day. Google, however, sees this as duplicate content (I just thought it was convenient to have two ways to get to my site. duh.), so I need to permanently redirect the entire Horrorview.net site to Horrorview.com in htaccess (so I'm told by one of them thar Google forum guys). I know how to do an htaccess redirect on a regular ol' html site, but...well...as for Drupal...

I'll be honest with you. I'm rubbish with php. I can't make heads or tails of it. I'm a designer and make pretty themes. That's about all I'm good for, sadly. I've done some really simple PHP stuff during my Drupal adventures, but all of the examples I've seen on the forum baffle me. Plus, I can't seem to find any threads specific to exactly what I need to do that aren't a few years old (which, in Drupal years, makes them antiquities). I fear "playing" with the htaccess file will break my site, and I'm already in the doghouse with Google as it is.

What I need is for someone to show me what to put and where to put it. I'll even give you a stack of DVD's if it works (hope you like horror, as it's all we review, here!). Seriously. If one of you can show me the light (in childlike terms), I'll shoot you my e-mail address, you hit me back, and I'll send you a weekend's worth of horror DVD fun. I'm desperate!!!

Thanks in advance! I impatiently await any and all replies. My hair is literally falling out as I type this.

-Very Anxious Jim

Comments

horrorview’s picture

Title: Please Help! Updated explanation of redirecting .net to .com with htaccess needed :( » PHP Gurus! Need help redirecting .net to .com with htaccess needed!

Sorry! This was meant to edit the subject, not add a post...

horrorview’s picture

Title: PHP Gurus! Need help redirecting .net to .com with htaccess needed! » PHP Gurus! Need help redirecting .net to .com with htaccess

See above! Where's the delete option?? LOL

gcassie’s picture

untested, but try this in .htaccess after the line RewriteEngine on:

RewriteCond %{HTTP_HOST} ^horrorview\.net$ [NC]
RewriteRule ^/(.*)$ http://horrorview.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^www\.horrorview\.net$ [NC]
RewriteRule ^/(.*)$ http://horrorview.com/$1 [L,R=301]
horrorview’s picture

HEy gcassie! Thanks for the reply! I THINK I may have fixed it (with a little help from the Drupal IRC chat community...wow! Never knew that was there!!). The fella there did this...

RewriteCond %{HTTP_HOST} ^horrorview\.com$ [NC]
    RewriteRule ^(.*)$ http://www.horrorview.com/$1 [L,R=301]
 
    RewriteCond %{HTTP_HOST} ^horrorview\.net$ [NC]
    RewriteRule ^(.*)$ http://www.horrorview.com/$1 [L,R=301] 

Does that look right to you? It DOES work as the site now resolves to the .com address from the .net. Now, as long as Google likes it...

horrorview’s picture

Oh, I just noticed that you did the RewriteCond twice, once for www. and once for without...should I do that as well?

gcassie’s picture

looks like the IRC snippet covers www.horrorview.net just fine.

if you have configuration questions like this it is better to ask in the post installation forums. this thread should probably be moved over there.

nice looking site, btw. glad you got your redirects working.

horrorview’s picture

Thanks a ton, Cassie! I also appreciate the compliment on the site :)

I'll remember to hit the post installation forum next time I've an issue!! :)

PhillReynolds’s picture

Another way to do this ( simpler to my mind? ) would be to just have,
a one line .htaccess file in your ".com" root directory containing this line...

Redirect permanent / http://www.example.net/

Used this on my site and it worked great, with no interference with SEO in Google

cweagans’s picture

Status: Active » Fixed

Closing this issue - looks like you've got it figured out.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.