Reputation: 11
I have various broken links of the form:
http://www.mysite.com/categA/categB/product*.html
(the final part of the url starts with the string "product")
and I want to create an .htaccess rule to redirect them to:
http://www.mysite.com/categC/categD/product*.html
...
Any ideas? Thanks in advance!
Upvotes: 0
Views: 352
Reputation: 13812
I believe this will work.
RewriteEngine On
RewriteBase /
RewriteRule ^categA/categB/product(.+)\.html$ categC/categD/product$1.html [L,R=301]
Upvotes: 1