I know this should be the easiest thing in the world, but I just can't get my head around rewriting and I have to do it so infrequently that I end up trawling Google for hours....
I'm consolidating two wordpress blogs into one new blog at a different URL. Alas, they both have different permalink structures.
The best thing I can come up with, is to redirect the less popular of the two to the search function of the new one - however I've fallen at the last hurdle: I need to replace all instances of hyphens in the URL to plus symbols.
- Old URL: http://www.myoldblogurl.com/2011/01/02/the-title-of-the-blog
- Desired URL: http://www.mynewblogurl.com/blog/?s=the+title+of+the+blog
What I have is this:
RedirectMatch permanent /[0-9]{4}/[0-9]{2}/([a-z0-9\-]+) http://www.mynewblogurl.com/blog/?s=$1
Which will give me: http://www.mynewblogurl.com/blog/?s=the-title-of-the-blog
I just need to find a way of changing those hyphens into plus symbols.