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:
Родитель
dd8b9d57e6
Коммит
7c59eaa186
|
@ -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"
|
||||
|
|
Загрузка…
Ссылка в новой задаче