I moved my wordpress page up a directory and also changed a bunch of categories with new names. But when I try to set a 301 redirect via .htaccess and then access that category url, the browser errors with a "too many redirects" message.
Redirect 301 /category/cat-a/subcat-a/subsubcat-a/ https://example.com/category/newcat-a/newsubcat-a/ Redirect 301 /category/cat-b/subcat-b/ https://example.com/category/newcat-b/mynewsubcat-b/ ... bunch more categories
the "category" slug stays the same in the new and old names.
I know there is a flag that makes a rule "final" but I'm not sure how I could make. Cause I also tried setting the flag afterwards like:
Redirect 301 /category/cat-a/subcat-a/subsubcat-a/ https://example.com/category/newcat-a/newsubcat-a/ [L]
I've tried this and many other variations but neither did work out in my favour.
Do I miss something. Im also not sure if there is a regex that solves that problem. Basically from what i've understand, this creates an infinite loop.