I converted a Joomla website to WordPress. Joomla article URLs have /blog/<RandomNumber>-slug. For example:
example.com/blog/164-postname
example.com/blog/214-anotherpostname
I need to remove /blog/164-postname from URL so it redirects to example.com/postname
Also there are some product category URLs with this format:
example.com/category/<RandomNumber>-slug
For example:
example.com/category/12-catname
I want to redirect these urls by changing category to product-category and removing numbers and - character so mentioned URL redirects to example.com/product-category/catname with 301 code.