public static RouteValueDictionary GetRouteDataFromURL(string absoluteURL)
    {
        var      testUrl = "~" + new Uri(absoluteURL).AbsolutePath;
        var      context = new StubHttpContextForRouting(requestUrl: testUrl);
             var routes  = new System.Web.Routing.RouteCollection();
             MvcApplication.RegisterRoutes(routes);

        System.Web.Routing.RouteData routeData = routes.GetRouteData(context);

        return(routeData.Values);
    }