diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index 10152eae6..328777124 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -8,6 +8,10 @@ class StaticController < ApplicationController redirect_to(url || posts_path) end + def not_found + render text: "not found", status: :not_found + end + def error end end diff --git a/config/routes.rb b/config/routes.rb index efa0fea34..20bb7bf10 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -420,4 +420,6 @@ Rails.application.routes.draw do get "/intro" => redirect("/explore/posts/intro") root :to => "posts#index" + + get "*other", :to => "static#not_found" end