[eluser]hal10001[/eluser]
[quote author="Colin Williams" date="1234006407"]Me again. What error message do you receive.[/quote]
I get a 404. My directory structure looks like this:
Code:
-- system
-- application
-- controllers
-- admin
-- sites.php
My controller:
Code:
<?php
class Sites extends Controller {
function Sites() {
parent::Controller();
}
function index() {
$this->load->view( 'admin/sites' );
}
}
Code:
-- system
-- application
-- views
-- admin
-- sites.php
My view:
Code:
<html>
<head>
<title>Admin » Sites » View</title>
</head>
<body>
Admin » Sites » View
</body>
</html>
I've read in other places developers talking about using routing to accomplish this, but according to the user guide, it really does look like I don't need routing if I'm following the rules and placing my controller in one subfolder and accessing the view where it is physically located. I'm sure this is something dumb, and I'm just missing it. Also, I'm not using "index.php" because I have this in my .htaccess:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]