Support » Fixing WordPress » Use part of old url to redirect to new

  • We’ve just made a new website using WordPress.
    In regard to this new site, there are some issues with old links.

    I would like to redirect these old links. Currently, they simply get the 404 page, but I would like to show them a page based on their link(url).

    The old links were like so: example.com/exp/344
    The number being a cabin. The old website used numbers, the new one uses the cabin name.

    However, I was wondering if it’s possible to redirect people to the correct page. Currently, our users are set up with this number as ID, so in the url, the author of cabin 344 is now: example.com/author/344

    Under the author, their cabin is also shown.
    So my question is, if it’s possible to redirect people, by changing part of the url?

    So when people enter the site using example.com/exp/344, it redirects to example.com/author/344

    If so, anyone can give me an idea about, how this is done?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello 55nord,
    Setup your permalinks to display the way you have described:
    example.com/author/344

    If you are having trouble accomplishing this, there are plugins available for making custom permalinks.

    Then, use a 301 redirect plugin to forward the old URLs to the new ones.

    Cheers,
    John-Paul

    @johnpaulb

    Thanks for your reply.
    The permalinks are already adjusted.

    I’ve looked trough some of the 301 redirect plugins – neither of them mentions any automatization. Keep in mind, I need to do this to roughly 500 pages, so I need a plugin that will do this automatically once I tell it what to replace, with what, so I can’t have a plugin that will simply redirect all old URLs to one page, but to a specific page for each and every url.

    I haven’t installed any of them yet, as I’m at home atm, but I will test them tomorrow. Maybe they do have this functionality.

    Moderator bcworkz

    (@bcworkz)

    Unless you can formulate a generic redirect, you will need to define each redirect individually no matter how you go about it. This can be done with .htaccess Redirect rules (assuming you are using Apache server) if you are unable to find a satisfactory plugin.

    Thread Starter 55nord

    (@55nord)

    @bcworkz

    It seems that the plugin “Redirection” allows to import redirects from csv file, this was really what I was looking for. Now I just need to figure out Excel 🙂

    I was hoping there would be a function that would allow to alter these, but I guess not 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use part of old url to redirect to new’ is closed to new replies.