WordPress.org

Ready to get started?Download WordPress

Forums

Quick Page/Post Redirect Plugin
[resolved] Redirect (3 posts)

  1. zabius
    Member
    Posted 1 year ago #

    I have two WordPress blogs on the same domain, (one called 'News' and another called 'Blog')

    I am moving across all the content from the 'News' blog to the 'Blog' blog but I need to setup the 301 redirects correctly to not damage anything from an SEO perspective.

    The old news link as as follows:
    http://www.site.com/news/this-is-my-post-name-3413
    The new link for the same post now it has been moved will appear like this
    http://www.site.com/blog/this-is-the-post-name
    Can anyone explain how I would correctly setup the htaccess 301 redirects to tell Google to redirect all the old "news" content to the new "blog"

    Can anyone explain how to use this plugin using some form of regular expression to do this?

    http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/

  2. zabius
    Member
    Posted 1 year ago #

    P.S I apologise I pressed submit too quickly.. and didn't realise I only put 'Redirect' in the title (I can't seem to change this either) :(

  3. prophecy2040
    Member
    Plugin Author

    Posted 1 year ago #

    Zabius,
    The plugin could work for what you are trying to do, but I don't think it is a good solution as you would have to manually enter every old post and the new url into the plugin - and that is a big waste of time. The plugin does not have a way to use regular expressions in the request check, so that is out of the question.

    As for htaccess, I am not an expert, but if you want to redirect the entire news item requests, you could add this to your htaccess file before the wordpress added items:
    RewriteRule ^news/(.*)$ /blog/$1 [L,R=301,NC]

    In your example, you show a number on the end of the request URL and not on the end of the redirected URL, I am only assuming this is the post id. If it is and it is not on the new blog urls, you may need to use something like this instead - as it will strip the post id off the end:
    RewriteRule ^news/(.*)(-[0-9]+)$ /blog/$1 [L,R=301,NC]

    Good luck.
    Don

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic