Forum Moderators: phranque
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?
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]