routes: restore bare /year/month/date/slug blog route

We only switched to /blog in 2013, so there's a real chance
that old links would use the bare format. And it's not that
hard to match them and give them the same redirect.
This commit is contained in:
Jeff King 2018-02-08 05:00:39 -05:00
Родитель dd8b9d57e6
Коммит 7c59eaa186
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -59,6 +59,8 @@ Gitscm::Application.routes.draw do
get "/blog" => "blog#index"
get "/blog/*post" => redirect("/blog")
get "/:year/:month/:day/:slug" => redirect("/blog"),
:year => /\d{4}/, :month => /\d{2}/, :day => /\d{2}/
get "/about" => "about#index"
get "/about/:section" => "about#index"