0
You can create a route where the segments will become the get parameters for a controller’s method or enter in the url the controller’s name and the desired method in the first and second segment respectively of the url. Segment is each value passed between the URL bars counting from the site’s base URL. 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 route would look like.
url: http://wedding.axitech.com.br/buscar/palhoca/bolos
access the file application/config/routes.php
and create the route $route['buscar'] = 'Busca/efetua_busca';
;
create the following controller:
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
}
}