Welcome to WebmasterWorld Guest from 54.205.251.179

Forum Moderators: phranque

Message Too Old, No Replies

Can someone check this htaccess redirect for me?

   
9:33 pm on May 7, 2003 (gmt 0)

10+ Year Member



Yesterday, someone wrote that a 301 redirect would be the best way to refer traffic from my www.abcwidgets.com URL to www.abc-widgets.com (where the site content actually exists).

I asked my hosting company for assistance with this, and they "helpfully" went ahead and put an htaccess file on the URL I wanted redirected.

I was hoping someone could look at the script that they used and make sure it's not going to cause me any problems with search engines.

RewriteEngine On
RewriteRule .*(.*) [abc-widgets.com...]

The redirect is working fine. There isn't, nor was there ever, any content on abcwidgets.com. So, I don't have to worry about any existing links. I just want to make sure the above script is a legitimate tool and that SE won't think I'm trying to pull a fast one.

Thanks

3:42 pm on May 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If there never was any content or links to the first site why worry about a redirect? Just in case of type-ins?

I'm no expert on htaccess but this is what I have seen for 301 redirects.

redirect 301 / [abc-widgets.com...]

4:03 pm on May 8, 2003 (gmt 0)

10+ Year Member



i've seen it done mainly for branding purposes and not for SE placement, 301 is the correct way as far as google is concerned as it reads it that the content is no longer housed there and has permanently moved to the redirected site.
4:14 pm on May 8, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



dzinerbear,

That is not a 301 redirect. It is, by default, a 302, and that will cause you problems.
You need to have them change it to:


RewriteEngine On
RewriteRule .* http://abc-widgets.com/ [R=301,L]

This code redirects requests for any resource on the www.abcwidgets.com domain to the home page of [abc-widgets.com...]

If you would rather redirect to the same page that was requested from www.abcwidgets.com, use:


RewriteEngine On
RewriteRule ^(.*)$ http://abc-widgets.com/$1 [R=301,L]

Use the WebmasterWorld Server Header Checker [webmasterworld.com] to verify both what I said about the 302 above, and that the modified code I posted invokes a 301.

Jim