cancel
Showing results for 
Search instead for 
Did you mean: 

Add a static URL prefix for product and category Magento 2

0 Kudos

Add a static URL prefix for product and category Magento 2

I need to specify a prefix static string for all URLs of my Products and Categories. Just like Wordpress Woocommerce permalinks.

 

For example all of Categories should have product-category prefix in their URL:

 

  • Cat One: domain.com/product-category/cat-one
  • Cat Two (child of 'Cat One'): domain.com/product-category/cat-one/cat-two

and all of Products should have product URL prefix, no matter what their Category is:

 

  • Product One: domain.com/product/product-one
  • Product Two: domain.com/product/product-two

 

I tried to do this solution, but It's for 3 years ago and not working in Magento 2.

Also this extension is for Magento 1.x as you see.

 

By the way, I'm using Magento 2.1.9 with PHP 7.0.22 and XAMPP 3.2.2.

Thanks.