I would like to display the view in the folder if no controller/action matches.
For example www.site.com/Home/Index, if I have the normal default route {controller}/
For missing actions you can override HandleUnknownAction.
For missing controllers you can implement a custom DefaultControllerFactory and override GetControllerInstance with something like this:
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType) {
if (controllerType == null)
return new DumbController();
return base.GetControllerInstance(requestContext, controllerType);
}
class DumbController : Controller {
protected override void HandleUnknownAction(string actionName) {
try {
View(actionName).ExecuteResult(this.ControllerContext);
} catch (Exception ex) {
throw new HttpException(404, "Not Found", ex);
}
}
}