I want to rewrite and redirect users from
http://www.example.com/blue-widget/page.php
to
http://www.example.com/purple-widget/page.php I've tried simple rewrite statements, RewriteCond %{REQUEST_URI} statements and RewriteCond %{THE_REQUEST} statements in various incarnations and can't seem to get any of them to work. The closest I've gotten is with this:
RewriteCond %{REQUEST_URI} /blue-widget/
RewriteRule ^(.*)$ http://www.example.com/purple-widget/$1 [R=301,L]
The result of the above is that /blue-widget/ gets appended to the end of the URL, so this:
http://www.example.com/blue-widget/
becomes this:
http://www.example.com/purple-widget/blue-widget/
And this:
http://www.example.com/blue-widget/page.php
becomes this:
http://www.example.com/purple-widget/blue-widget/page.php
I feel like I'm getting really close to a solution. Any help?