We\'re switching from an old site to a new site with better URLs for SEO. I\'m trying to do this:
RewriteRule ^products/boots/materialid/(.*)/colour/(.*)$ http:/
Try this:
RewriteRule ^products/boots/materialid/([^/]*)/colour/([^/]*)/?$ http://www.mydomain.com/boots/$2/$1 [R=301,L]
[^/]
matches any character that is NOT a slash. /?
means an optional trailing slash (note that it is outside of the capturing parentheses, so that it will not be included in the rewritten URL).
EDIT
As per your comment, to add an optional /index.php:
RewriteRule ^products/boots/materialid/([^/]*)/colour/([^/]*)(/|/index\.php)?$ http://www.mydomain.com/boots/$2/$1 [R=301,L]