Ideally, you should try and specify your routes, for example, if you have the URL / products / 42, and you want it to go to the general controller, you should explicitly specify it as
routes.MapRoute( "Poducts", "products/{id}", new { controller = "Content", action = "Show", id = UrlParameter.Optional } );
then you must specify a different route for something else, e.g. / customers / 42
routes.MapRoute( "Customers", "customers/{id}", new { controller = "Content", action = "Show", id = UrlParameter.Optional } );
this may seem a little verbose, and creating one route may seem cleaner, but the problem is in one route - you will never get 404 and will have to handle such things in code.
source share