homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

These terms have been highlighted:
301 redirect [ remove highlighting]

Can someone check this htaccess redirect for me?

10+ Year Member

Msg#: 2339 posted 9:33 pm on May 7, 2003 (gmt 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.




WebmasterWorld Senior Member 10+ Year Member

Msg#: 2339 posted 3:42 pm on May 8, 2003 (gmt 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...]


10+ Year Member

Msg#: 2339 posted 4:03 pm on May 8, 2003 (gmt 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.


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

Msg#: 2339 posted 4:14 pm on May 8, 2003 (gmt 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.


Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved