I have a search action method which accepts at this time 5 optional parameters for its search criteria.
My home page has a quick search button which submits a GET request to the search action method. I have everything
working fine, however my urls are being generated using standard querystring syntax (?x=x&y=y).
I would like to expose friendly urls but the only way I see possible using the routing system would be
to add every single permutation posible since all the parameters are optional, which does not sound very
elegant.
So are there any other routes (no pun intended 🙂 ) I can take? Possible a Url rewrite module?
Any help would be greatly appreciated.
Option 1: Live with querystrings. There is nothing that great about friendly Urls on a search page.
Option 2: Allow at most one optional parameter to be part of the “friendly” Url. Any additional parameters must be passed in querystrings. For example: