Forum Moderators: phranque

Message Too Old, No Replies

redirect issue for new site

         

esllou

5:15 pm on Jul 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have one directory on one domain:

example.com/widgets/blue/page1.shtml
example.com/widgets/red/page1.shtml
example.com/widgets/red/page2.shtml

and so on.

Now, I have decided to do a separate widgets site and the directory structure is the same: ie. red and blue

I am getting G and Y traffic to the old example.com pages and want to do 301 redirect to the new widgets.com site.

basically I want "example.com/widgets" to be replaced by "widgets.com" in any URL as that will be correct and will arrive at the new site.

is there a simple way of doing this?

ChadSEO

9:31 pm on Jul 26, 2005 (gmt 0)

10+ Year Member



Well, assuming I understand what you need, an .htacces file in the top level directory (where the widgets directory is) should take care of it. Here's the contents of the file:


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

[edited by: jdMorgan at 9:43 pm (utc) on July 26, 2005]
[edit reason] Repaired formatting [/edit]

esllou

7:20 pm on Jul 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



great, thanks for that