• Dear friends, I used the following configuration of permalinks:
    /%category%/%postname%/

    Now, I use this setting:
    /%category%/%postname%-%post_id%/

    I want to know is how I have to configure it to redirect all posts automatically to the new structure of permalinks.

    Thank you!

    https://wordpress.org/plugins/redirection/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Not with the Redirection plugin. It works by matching the request from the visitor, and then forwarding them to the new page; it doesn’t operate with the post in any way, so it wouldn’t be able to figure out which post ID to attach to the target URL.

    I am curious, why did you choose to use the post ID in the URL? Do you have URLs that have the same title?

    Thread Starter umarizal

    (@umarizal)

    Thanks for listening, friend.

    So at the moment I have no post with duplicate title, but I thought I’d use the ID in the URL to avoid duplication in the future.

    If do not have to do this through Plugin, can you give me any tips on how to do through .htaccess, for example?

    Thank you 😉

    First of all, you wouldn’t be able to do it, because a plugin would have to lookup the post ID to figure out the redirect. That isn’t a good idea, because you don’t want to use the database to figure that out.

    But second of all, you don’t have to worry about it, since you don’t have any duplicate posts. Meaning future posts will have the correct URL, and your old posts will continue to work. So you are good…

    However, you could probably just leave your permalinks structure alone, as WordPress adds a number to the end of duplicate post titles, anyways. Try it out, make a post called test, and another one called test, and see what it does. No need to use this plugin, or any other. ^_^

    Thread Starter umarizal

    (@umarizal)

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Permalinks structure changed’ is closed to new replies.