[eluser]polipspy[/eluser]
Hi, I have this problem with codeigniter uri.
I wanted my uri to be like these:
domain.com/about-us
domain.com/contact-us
domain.com/services
instead of these
domain.com/page/about-us
domain.com/page/contact-us
domain.com/page/services
I wanted to pull the data for each page from the default controller like this
function index($slug){
$data['content'] = $this->pagemodel->_get_page($slug);
$this->load->view('template',$data);
}
I also have these in my routes
$route['page:any'] = "page/index/$1";
For example if I go to this page domain.com/about-us but did not create a controller for it, Codeigniter returns a 404.
It would really be nice if Codeigniter checks for methods in the default controller if the controller for the page does not exist.
Thanks.