Mod Rewrite 301 Help

I need to 301 some links. I have been getting my knees wet with ModRewrite for a while now, but this one seems to throw me. The format I’m looking for is below.

Old - [noparse]http://www.sitename.com/big-widget/blue/2.html[/noparse]

New - [noparse]http://www.sitename/blue-big-widgets/2.html[/noparse]

Two thinks to note, I have added a (s) to the end of widgets. As well as the 2.html will be any number between 1-100 depending on the page.

Thanks for your help in figuring this out.


Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([a-z]+)-([a-z0-9-]+)s/(\\d+)\\.html $2/$1/$3.html [L]

(untested)

Thanks for the suggestion. The solution I ended up going with was

RewriteRule ^(big-widget)/([^/\\.]+)/(.*) $2-$1es/$3 [R=301,L]

A more dynamic version is

RewriteRule ^([^/\\.]+)/([^/\\.]+)/(.*) $2-$1es/$3 [R=301,L]