Redirect .html to new links?
-
Hi,
I have old URLs like:
example.com/webshop/cat/product-name.html
and like:
example.com/webshop/cat/subcat/product-name.htmlI want both to be redirected with regex to:
example.com/product/product-nameHow can I target $1 to only use the productname that comes before the .html?
I tried:
Source:/webshop/(.*?)\.html
Target/product/$1/
But this also copies the categories to the new url. I can’t just do
Source:/webshop/.*?/.*?/(.*?)\.html
Target/product/$1/
Because not all products are in subcategories.
So how can I just get the productname that stands before the .html and use that in the target?Thanks
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Redirect .html to new links?’ is closed to new replies.