In Codeigniter there is a configuration file called router.php where we set up friendly urls. In the url of the site I'm making I need to leave 2 dynamic parameters like this:
www.siteexemplo.com.br/parm1/parm2
I configured the routes file as follows:
router['(:any)'] = "paginas/buscap1/(:any)";
router['(:any)/(:any)'] = "paginas/buscap2/(:any)/(:any)";
This means that when I have parameter 1 for example in the url the site will redirect to the controler paginas
in the buscap1()
method and in it I filter the (:any)
parameter. >
The problem is that when url has the second parameter, routing does not work and the system only redirects to the same method when it only has one parameter.
Has anyone ever had to do something similar that can give me a help?