0

Changed from /yyyy/mm/sample-post to /sample-post.

Now everyone who has an old link is going to 404.

How do I redirect all those links to the proper post?

This is WordPress on Nginx.

2
  • Here is the post exactly covering your problem. Do not use PHP code or plugins to avoid unnecessary server load and time.
    – Max Yudin
    Mar 10, 2017 at 8:23
  • Sorry but did you test the old urls? It should redirect on it's own. Mar 10, 2017 at 11:42

1 Answer 1

0

Using the Simple 301 Redirects Plugin

You can download the plugin from the WordPress.org repository here. Once you have installed and activated the plugin it adds a new menu to the Settings area of your dashboard.

enter image description here

There really isn’t a great deal to worry about with this plugin. In the 301 Redirects settings window you are shown two simple fields. One is labeled Request and the other Destination. This is basically where you enter the old permalink structure and the new permalink structure. You only need to add the information after your domain name to these fields.

In the example in the image above, the Request field is the WordPress configuration for the Month and Name permalinks while the Destination field is the WordPress configuration for the Post name permalink structure. Once you have added these two fields, save the changes. This will now tell any search engine traffic that comes into the old links where to go.

Reference : http://www.wpexplorer.com/change-permalinks-wordpress/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.