I’d like to redirect urls in a WordPress site and I could use recommendations for good plugins or methods of doing this effectively and cleanly. What I’d like to do is redirect something like:

http://acmesite.com/pathA/page.html

to:

http://acmesite.com/pathB/page.html

What I want to do is change a top level menu item on the site without breaking all the links to the underlying pages. I can change the links I am aware of but I’d like to ensure that legacy links still resolve to the correct page on the new URL path.

Any suggestions how best to do this?


Discover more from Paul Jacobson

Subscribe to get the latest posts sent to your email.

  1. Nathan Jeffery avatar

    These two plugins look like they might be able to do the trick, I haven’t personally tried them though.

    http://wordpress.org/plugins/redirection/

    https://yoast.com/wordpress/plugins/permalink-redirect/

    1. Paul avatar

      I knew about the Redirection one. It looked a bit neglected. The other one looks interesting, if anything because its a Yoast plugin.

  2. Allan avatar

    Try this:

    RedirectMatch 301 /pathA(.*) /pathB/$1

    Or

    RewriteRule ^pathA/(.*)$ /pathB/$1 [R=301,NC,L]

    If you’re using Worrpress the .htaccess file should already exist.

    1. Paul avatar

      Thanks Allan. Will the rewrite option actually modify the urls or effect a redirect?

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.