I moved my website to a different CMS. The old CMS used to generate URLs in the following format:
example.com/discussion/100/how-are-you
After discussion, it can have any number; I have used 100 as an example.
The new CMS generates URLs in the following format:
example.com/how-are-you
So, basically, I need to check if the URL contains "discussion/number", remove "discussion/number" from the URL, and redirect it.
Redirect from
example.com/discussion/100/how-are-you
to
example.com/how-are-you
How can I do it using .htaccess?