I'm writing an app that allows you to filter database results based on Location and Category.
If someone was to search for Liverpool under the Golf category the URI would be /index.php/search/Liverpool/Golf
.
Should someone want to search by Location but not category, they would be sent to /index.php/search/Liverpool
However, should someone want to filter only by category they would be unable to use /index.php/search/Golf
because that would be caught by the location search.
Is there a best practice way to have /index.php/search/Golf
be recognised? Some best practice as to what else to add to the URI to make these two queries distinct? /index.php/search/category/Golf
perhaps?
Though that is beginning to show characteristics of /index.php?search&category=Golf
which is exactly what I'm trying to avoid.