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.
Like the answer by Arkan. One point, if do not want this behaviour in development environment, then could do -
match '*path' => redirect('/') unless Rails.env.development?