I had an old website programmed for me and now i have migrated it to wordpress, but many websites still have links to the old urls and i want to redirect them to WordPress because there are having a 404 response.
the old structure was: http://www.website.com/news/2013/june/01/slug-slug-slug-slug
the new in wordpress: http://www.website.com/news/2013/06/01/slug-slug-slug
Note that i only need to change:
january -> 01
february -> 02
march -> 03
april -> 04
may -> 05
june -> 06
july -> 07
august ->08
september -> 09
october -> 10
november -> 11
december -> 12
Do i have to include something in wordpress’ .htaccess or in the rewrite.php file? I heve been thinking that i only need to change the %monthday% variable from numeric to string… but if i update wordpress i probably need to change it again.
If you want to use mod_rewrite, you can do this with 12 rules. I am not familiar with wordpress itself and I don’t know if there is an ‘easy’ way via the config of WordPress itself. Add the following rules above the rule that sends all requests to WordPress’ index.php file:
As always, see the documentation for information about the syntax being used.
There will be 12 rules like this so you can have something like this:
Also make sure to have these rules on top, before any other rewrite rules.