need some help yall.
I am currently attempting to change the permastructure of all of my wordpress posts from /%year%/%monthnum%/%postname%/ to just /%postname%/.
I have already made the change in wordpress and added the following code to my htaccess file to initiate the 301 redirects:
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.+)$ http://www.mydomain.com/$3
Now everything is working perfectly except for 1 thing. It has caused all archived date pages, for example www.mydomain.com/2013/8/20, to redirect to www.mydomain.com/20 which causes 404s.
My question is how do i edit the code to not reflect those archived dates. I imagine it's something fairly simple but i know minimal coding and have already spent hours searching online only to come up short, and i am very surprised as the code I used was given as a common fix. I assume most people didnt either use their calendar widgets, or never noticed this problem. Also, all the 301/permalink plugins for wordpress are shit/dont accomplish this to my knowledge. I found one that would have worked except it was registering 302s ftl.
anyway please and thanks for help.
I am currently attempting to change the permastructure of all of my wordpress posts from /%year%/%monthnum%/%postname%/ to just /%postname%/.
I have already made the change in wordpress and added the following code to my htaccess file to initiate the 301 redirects:
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.+)$ http://www.mydomain.com/$3
Now everything is working perfectly except for 1 thing. It has caused all archived date pages, for example www.mydomain.com/2013/8/20, to redirect to www.mydomain.com/20 which causes 404s.
My question is how do i edit the code to not reflect those archived dates. I imagine it's something fairly simple but i know minimal coding and have already spent hours searching online only to come up short, and i am very surprised as the code I used was given as a common fix. I assume most people didnt either use their calendar widgets, or never noticed this problem. Also, all the 301/permalink plugins for wordpress are shit/dont accomplish this to my knowledge. I found one that would have worked except it was registering 302s ftl.
anyway please and thanks for help.