Forum Moderators: phranque
RedirectMatch permanent ^/dir1/ http://www.example.com/dir2/
will redirect all resquests to pages in in dir1 to the index page of dir2.
Now though I find Google is spewing up non-trailing slash duplicates (that don't redirect) with URLs like:
www.example.com/dir1
So, will this:
RedirectMatch permanent ^/dir1 http://www.example.com/dir2/
redirect do the same as above, with the single additional consequence of also redirecting the single extra URL of www.example.com/dir1
?
Are there no other consequences or dangers in doing this?
Or, should I just use what I did before, and include a second entry:
RedirectMatch permanent ^/dir1$ http://www.example.com/dir2/
I don't want to have unecessary entries, but also don't want to make a confusing or non-standard entry.