.htaccess 301 redirects wordpress

I’m trying top redirect a standard WordPress “folder” url of a page to a new one on the same domain while keeping all subfolders, query strings etc. From domain/old-path/ to domain/new-path/.

Now I have this:

RedirectMatch 301 ^/old-path(.*) /new-path$1

It works, but domain/old-path redirects to domain/new-path and, this beeing WP, another redirect happens from domain/new-path to domain/new-path/.

I would like both domain/old-path and domain/old-path/ to redirect straight to domain/new-path/ with the ending /.
All this while, like i said, keeping all “subfolders”, query strings etc.


Read more here: .htaccess 301 redirects wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *