public ActionResult Category(int id, int?country, int?manufacturerId, int?packId, object specs, SortCriterion?sort, List <List <int> > catFilter = null, int?minPrice = null, int?maxPrice = null, string query = null) { bool exists = _shopCategoryService.CategoryExists(id); if (!exists) { throw new HttpException(404, "Not found"); } var cat = _shopCategoryService.GetCategory(id); var routeValues = ParamExtractor.ExtractParamsForSEF(Request); var args = new RouteValueDictionary(routeValues); args.Add("relativeUrl", cat.CanonicalUrl); args.Remove("id"); return(RedirectPermanent(Url.RouteUrl(typeof(Category).FullName, args))); }