I\'m having trouble making the page load the controller I want it too.
For example I want my site to load as localhost/sitename/catergory1/catergory2 where catergory
You have a typo in category1
btw.
If I follow correctly you have this structure:
\ controllers
- home.php
\ category1 \
- cat1.php
If so, you confused yourself with your route:
$route['category1 '] = 'category1/cat1/index';
Need to define the method index
, this is based on your 'cat1.php' file being:
class Cat1 extends CI_Controller{
function index() {
$this->load->view('cat1');
}
}
I wrote about this, as people usually get confused with routes in CI:
http://blog.biernacki.ca/2011/12/codeigniter-uri-routing-issue-with-controller-folders/