Streaming live at 10am (PST)

Redirect: how to write correctly?

Please tell me how to correctly write “redirect”?

I have two collections: categories and products.
From the URL I want to remove the word «category» and leave only the name of this category. For example: «» should be —> «»

And from the product URL I want to replace the word «product» with the name of the category name of this product. For example: «» should be —> «»

How exactly should I write redirects for categories and products?

This is a website:
This is a project in Webflow: