I now set uri routing in my codeigniter config like this
$route['user/:any'] = "users";
and everything works fine with request like this
http://localhost/user/1
but if i try request
http://localhost/user/
so uri segment is empty, i am getting error
404 Page Not Found
The page you requested was not found.
how to avoid this? I ve tried to use
$user = $this->uri->segment(2);
if (!isset($user)) redirect('/', 'refresh');
but this is not working.
1can be only... administrator ;D$route['user'] = 'users'; $route['user/(:any)'] = 'users/index/$1';? What isvar_dump($slug); die();in your index method in your controller users echoing when you access it likehttp://something.com/user/2?