I have been working hard trying to understand regular-expressions to use in my web site using the redirection plugin. I have changed my permalinks a few times in the past year because I did not know better or had incorrect advice. The upshot of this is that Google web master tools shows hundreds of 404's.
I decided to tackle fixing the 404 issue with Redirections and know that I'm past my experience to fix, and this website is the best I have come across in the past few days that seems to have knowledgeable and helpful experts on the subject.
I'd like to fix myself because I know my permalinks structures of the 404 errors based on the webmaster tools download, and am comfortable using regular expressions in the redirection plugin, but if this is beyond a scope of a DIY, I'd be very interested in paying someone to correct.
Here is the variety of former permalinks.
String = /2010/10/02/abcd-abcd-124/ String = /2010/10/02/abcd-abcd-124 String = /2010/10/02/abcd-abcd-abcd-2-1234/ String = /2010/10/abcd-abcd-abcd-2-1234/ String = /2010/10/02/abcd-abcd-abcd-2-123 String = /2010/10/02/abcd-abcd-abcd-2-123/ String = /2010/10/02/abcd-abcd/ String = /2010/10/02/abcd-abcd-2/ String = /2010/10/02/abcd-abcd/feed String = abcd String = /websitename/abcd (recent, web crawl)
The bulk of the 404 errors are with this string
year/month/day/postname-postID/ (with and without forward slash)
What I want to do is strip the post ID from permalinks, redirect to a new permalink structure %year%%postname%
I have had some success with this regex:
however I cannot figure how to strip dash - before postID
I would be very grateful for any advice, I have tried for hours using regex tools to find an expression that works , but I'm stumped.....THANKS !!