We’ve changed our permalink-structure from /archive/%post_id%
to /%year%/%monthnum%/%postname%/
for better SEO.
Now we have the problem, that all old URLs on Facebook for example are pointing to a 404 page.
Is it possible to rewrite the old URLs to the new format?
4
Answers
Added the following code to my themes functions.php
Will be better to make redirection 301 from old to news.
Several rules in the .htaccess should work.
I think you can use plugin “Simple 301 Redirects” to redirects from your old URLs to your new URLs.
You can dowload it at here https://wordpress.org/plugins/simple-301-redirects/
If you need to 301 old URLs to the new, a WordPress plugin called ‘Eggplant 301 Redirects’ works really well.
https://wordpress.org/plugins/eps-301-redirects/