First question here :).
A site we run currently uses hierarchical (nested) URLs e.g. example.com/folder/page/
We would now prefer flat URLs e.g. example.com/page/
Our CMS can easily allow a switch to pages being given flat URLs. However it does not handle the redirects from the old hierarchical URLs. It looks like it needs to be handled in the .htaccess file.
There are 250+ pages so it would be preferable to have code that would handle all the redirects rather than doing a redirect 301 for each URL.
Can anyone provide some .htaccess code or point me in the right direction to achieve the redirects?