I'm building my first CodeIgniter application and I need to make URLs like follows:
Example: /rj/rio-de-janeiro This example should give me 2 parameters: $uf ('rj') and $city ('rio-de-janeiro')
Another URL possible is:
Example: /rj/3 This example should give me 2 parameters: $uf ('rj') and $page (3)
In other words, the parameters "city" and "page" are optionals. I can't pass something like '/uf/city/page'. I need always or 'city' OR 'page'. But I don't know how to configure these routes in CodeIgniter configuration to point to same method (or even to different methods).