Using `rack-rewrite` to Remove the Month and Date from a Permlink
- by Bryan Veloso
I've started the process of moving my blog to Octopress, but unfortunately, a limitation of Jekyll doesn't allow me to use abbreviated month names for my permalinks. Therefore I'm looking to just get rid of the month and day bits altogether.
I'ved read in this article that you can use rack-rewrite to take care of the redirection, since I am using Heroku to host this.
So how would I turn:
This: example.com/journal/2012/jan/03/post-of-the-day/
Into this: example.com/journal/2012/post-of-the-day/
Extra points: If I had another rule that redirected /blog/ to /journal/, would that rule still adhere to the above one as well? So from:
This: example.com/blog/2012/jan/03/post-of-the-day/
To this: example.com/journal/2012/jan/03/post-of-the-day/
And finally to: example.com/journal/2012/post-of-the-day/
Thanks for the assistance in advance. :)