I've not seen an answer for this mass 301 redirect issue specifically... Can anyone let me know how to do this.... category/brand URLs: redirect: /ID-some-brand (e.g. /43-religion-clothing or /26-ichiban) to: /some-brand (e.g. /religion-clothing or /ichiban) Product URLs: redirect: /some-category/ID-some-product-name.html (e.g. /mens-sweat-shirts/1543-ichiban-fairly-offensive-sweat-in-grey.html) to: /some-product-name (e.g. /ichiban-fairly-offensive-sweat-in-grey) We have 1,090 products and 60+ categories so some form of .htaccess trick would be amazing to know. If anyone could provide me with what I could put in the .htaccess to accomplish this I would be eternally grateful!
This should do the trick : RewriteEngine on RewriteBase / #brand redirectMatch 301 ^/([0-9]+)-([^/.]+)$ http://www.yourdomain.com/$2 #product redirectMatch 301 ^/([^/.]+)/([0-9]+)-([^/.]+)\.html$ http://www.yourdomain.com/$1/$3 Code (markup):