You can create a route where the segments will become the get parameters for the method of a controller or enter in the url the name of the controller and the desired method in the first and second segments respectively of the url. Segment is each value passed between the url bars counting from the url base of the site. The sequence is: url_base/controlador_ci/metodo_do_controlador/parametro1/paramentro2/
... Where controlador_ci
is the first segment, metodo_do_controlador
the second segment, and so on. Here is an example of what the url you want with the route would look like.
url: http://wedding.axitech.com.br/buscar/palhoca/bolos
access the file application/config/routes.php
and create the $route['buscar'] = 'Busca/efetua_busca';
route;
create the following driver:
Controller
public class Busca extends CI_Controller {
public function __construct() {
parent::__construct();
}
public function efetua_busca($onde, $oque) {
/* $onde receberá palhoca e $oque receberá bolos.
A sequência é a mesma que passada na url */
echo $onde; // imprime palhoca
echo $oque; // imprime bolos
}
}