Redirection

suggest change

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('/')

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Routing:
*Redirection

Table Of Contents
1Routing
55CSV