Based on my recommendation from the SEO team, I am trying to create friendly SEO URLs. For some static pages, I made it easy using RouteCollection.MapRoute (), like -
routes.MapRoute("Solutions", "Solutions", new { controller = "Home", action = "Solutions" }, new[] { "MyAuction.Controllers" });
routes.MapRoute("Offerings", "Offerings", new { controller = "Home", action = "SolutionOfferings" }, new[] { "MyAuction.Controllers" });
routes.MapRoute("Pricing", "Pricing", new { controller = "Home", action = "Pricing" }, new[] { "MyAuction.Controllers" });
Then I tried to create SEO friendly routes for my dynamic routes. For example, several auctions are planned during the day that contain hundreds of cars planned at the auction. To show the details of this planned car at auction, the actual URL is somewhat -
http://example.com/Auction/VehicleDetails?AuctionId=42&VehicleId=101
Please note that VehicleIdis an identifier in the table AuctionVehicles, which also contains other information about the vehicle, such as Make, Model, Yearand VINetc.
What I want to achieve is to create a dynamic URL, for example -
http://example.com/42/honda-civic-2010-123456
where 42 is the auction identifier, and honda is make, civic is the model, 2010 is the year, and 123456 is the last 6 digits of the VIN.
I don’t know how to achieve this.
I tried using this link -
Dynamic Routes from Database for ASP.NET MVC CMS
Any help would be greatly appreciated.