Welcome to WebmasterWorld Guest from

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)

New User

10+ Year Member

joined:May 3, 2003
votes: 0

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.


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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 16, 2003
votes: 0

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)

Junior Member

10+ Year Member

joined:Feb 6, 2003
votes: 0

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)

Senior Member

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

joined:Mar 31, 2002
votes: 0


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.