I made the pagination in the codeigniter and it works with exception of a detail the page link two gets url / 1, page three gets url / 2 and the first only the url. What do I do to make page two with url / 2? Here is the code:
$config = array();
$config["base_url"] = base_url() . "usuarios";
$config["total_rows"] = $this->usuario->totalRegistros();
$config["per_page"] = $this->config->item('registros_por_pagina');
$config["uri_segment"] = 2;
$this->pagination->initialize($config);
$pagina = ($this->uri->segment(2)) ? $this->uri->segment(2) : 0;
$data['usuarios'] = $this->usuario->listarUsuarios($config["per_page"], $pagina);
$data["paginacao"] = $this->pagination->create_links();
Thank you