Hi there!
I have a problem which I'm sure should be fairly simple.
I have several routes which catch various different types of urls that contain different structures, but they correspond to other urls which can be found inside the routescollection.
routes.MapRoute(
"Product",
"products/{product}.htm",
new { controller = "Product", action = "ShowProduct" }
);
routes.MapRoute(
"ProductReview",
"products/{product}/reviews.htm",
new { controller = "Product", action = "ShowProductReview" }
);
routes.MapRoute(
"Partner",
"partners/{partner}/{*wildcard}",
new { controller = "Partners", action = "PartnerRedirect" }
);
In this example, I have the product route, and then I have partner sites which could also go to a product page.
For example, Lets say I go to http://mysite.com/products/cola.htm. This should go to the same url as http://mysite.com/partners/pesi/products/cola.htm, and the PartnerRedirect would be able to handle the url based on the wildcard.
My question is, how can I, from the wildcard, determine what controller to pass the user onto?
Many thanks in advance.