I have a Magento 2.1.10 store. I have imported all the products and categories. Now the product url is
But I want the URL as
For this I have done the following steps
Removed .html from both fieldsProduct URL Suffix ,Category URL Suffix .
Saved the config ,reindexed and cleared cache.
But it didn't removed the html from url
Then I have tried this solution https://github.com/magento/magento2/issues/3679#issuecomment-311075725
It works for all categories and some products. Now few Products have url like this http://www.exaple.com/catalog/product/view/id/140/s/water-dispenser/category/43/
How can I make these URL as http://www.exaple.com/samplecategory/water-dispenser ?