Developer forum

Forum » Ecommerce - Standard features » Product redirect link isn't working

Product redirect link isn't working

Nay Chi Phyo
Reply

Hi all,

I have a problem redirect product pages. 

There are two same pages with different URLs. 

  1. Product page (https://domain-name/products/dry-food) and 
  2. Product subcategory page (https://domain-name/cat/cat-food-treats/food/dry-food).

I want to redirect the product page URL to the product-subcategory page URL. So, I tried in Redirect Function and check it. But it is not affected in the frontend, it is not redirected to the category page. 

 Can we redirect the product URL to another URL in a standard? Is there anything that I missing? 

Best Regards,

Nay Chi Phyo

redirect.png

Replies

 
Nicolai Pedersen
Nicolai Pedersen
Reply

The redirect feature in Redirects settings is only applied when the URL does not exist. And since https://domain-name/products/dry-food exists, it will not be caught by your entry.

In your template, you can have a look at the canonical URL of the product and redirect to that if it is different than the browsers current url.

BR Nicolai

 

You must be logged in to post in the forum