For example typing: localhost:3000/absurd-non-existing-route
How do I get invalid routes to point to the main page of the application in Rails?
Use rescue_from in your ApplicationController
to rescue ActionController::RoutingError
and redirect to the home page when it happens.
This will not work in Rails 3 currently. A ticket has been filed.