You can perform redirection in Rails routes as follows:
get '/stories', to: redirect('/posts')
match "/abc" => redirect("http://example.com/abc")
You can also redirect all unknown routes to a given path:
match '*path' => redirect('/'), via: :get
# or
get '*path' => redirect('/')
match '*path' => redirect('/')