I need the following routes:
example.com/products
goes to a product categories page (e.g. cars, trucks, buses, bikes)
controller=Products
, action=Categories()
example.com/products?a=1&b=2
goes to an index of all products in a particular category (e.g. Ford, Honda, Chevy)
controller=Products
, action=Index(string a, string b)
The routes only differ on the querystring, and it seems that MVC ignores anything after the "?". So of course only one rule will ever get hit--the first one.
How do I differentiate between the two?
Edit: stated differently, I want two routes. Is it possible to use the querystring in the route or does MVC truly ignore it? Is there any way to hack it, or use a custom routing scheme of some kind, much like I can do custom binding and custom validation?