title: How to create generic route handler in ASP.NET Core
body: <p>I would like to create a route handler that will redirect to action/controller depends on the url. For example in ASP.NET MVC 4,5 we could create custom route class and override GetRouteData method  and set own route values, e.g.</p>
  
  <pre><code> public override RouteData GetRouteData(HttpContextBase httpContext){
  
    RouteData data = base.GetRouteData(httpContext);
    data.Values["controller"] = "SomeController";
    data.Values["action"] = "SomeAction";
  
    return data;
  }
  </code></pre>
  
  <p>I tried to do the same in ASP.NET Core, but there is no posibility to override 
  GetRouteData method.
  Are there any other tricks?</p>