How do you redirect all of the product URLs to go to the Primary Permalink?
-
We have a wordpress/woocommerce website and we are using the Redirection Plugin to create 301 redirects.
The way that WooCommerce works, when you assign products to multiple categories, is that you can access the same single product from all the different combination of categories.
We need a redirection rule that will redirect all different combinations of permalinks so that they all redirect to the Primary Product Permalink.
Example:
There is a product on our site with the endpoint of: /1-part-of-a-whole-fractions-activity/
The main primary permalink is: https://www.havefunteaching.com/resource/subject/math/geometry/1-part-of-a-whole-fractions-activity/
However, you can access this product through many different URL combinations, including:
https://www.havefunteaching.com/resource/activities/1-part-of-a-whole-fractions-activity/
https://www.havefunteaching.com/resource/math/fractions/1-part-of-a-whole-fractions-activity/
And many more, all based on the different categories that we have assigned this product to in WooCommerce. Some of these other variations are indexed in Google because they have been marketed on social media and other sources in the past.
But, we want all the various combinations of permalinks for this one product to all 301 redirect to the main primary permalink of: https://www.havefunteaching.com/resource/subject/math/geometry/1-part-of-a-whole-fractions-activity/
We are not sure how to do this without creating a redirect loop.The page I need help with: [log in to see the link]
- The topic ‘How do you redirect all of the product URLs to go to the Primary Permalink?’ is closed to new replies.