Whenever a user hits the wrong page, rails shows 404.html from the public folder. However, I\'d like just to redirect the browser to the root page, without showing anything.
If your project is powered by rails 3, add simply this line to your routes.rb
match '*path' => redirect('/')
Edit: If you're on Rails 4 or 5
match '*path' => redirect('/'), via: :get
or
get '*path' => redirect('/')