From 7c59eaa186ab71781402a8f83a012daec32bebf8 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 8 Feb 2018 05:00:39 -0500 Subject: [PATCH] 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. --- config/routes.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/routes.rb b/config/routes.rb index 98cad348a..057c31624 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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"