I’ve read over the similar questions on stackoverflow, but have been unable to get this working. I keep getting stuck in an infinite loop.
I’m trying to redirect a specific url to a child of that url. eg:
Redirect 301 /category/parent-cat http://domain.com/category/parent_cat/child_cat
Sticking with mod_alias, you could use
RedirectMatchinstead so that you could anchor the pattern at the end of the URL:The mod_rewrite solution is almost identical:
You could naturally replace the
[^/]+patterns with the specific paths you were looking for, as well. I thought I’d provide a more general solution just in case, though.