I want to remove the parent categories from the subcategory URL.
For example, I would like to change:
www.magento2.com/Category1/Category2/Category3/Category4.html
to
www.magento2.com/Category4.html
Is there any way to programmatically remove parent category from subcategory URL?