public static Route MapRedirectingRoute(this RouteCollection routes, string targetRouteName, string url, object defaults, object constraints)
        {
            if (routes == null)
                throw new ArgumentNullException("routes");

            if (String.IsNullOrWhiteSpace(url))
                throw new ArgumentNullException("url");

            var route = new RedirectingRoute(
                url,
                targetRouteName,
                new RouteValueDictionary(defaults),
                new RouteValueDictionary(constraints),
                new RedirectingRouteHandler()
            );

            routes.Add(route);
            return route;
        }
        public static Route MapRedirectingRoute(this RouteCollection routes, string targetRouteName, string url, object defaults, object constraints)
        {
            if (routes == null)
            {
                throw new ArgumentNullException("routes");
            }

            if (String.IsNullOrWhiteSpace(url))
            {
                throw new ArgumentNullException("url");
            }

            var route = new RedirectingRoute(
                url,
                targetRouteName,
                new RouteValueDictionary(defaults),
                new RouteValueDictionary(constraints),
                new RedirectingRouteHandler()
                );

            routes.Add(route);
            return(route);
        }