Welcome Guest, Not a member yet? Register   Sign In
Controller in a subfolder per user guide is not working
#5

[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]


Messages In This Thread
Controller in a subfolder per user guide is not working - by El Forum - 02-06-2009, 11:07 PM
Controller in a subfolder per user guide is not working - by El Forum - 02-06-2009, 11:33 PM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 12:06 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 03:09 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 06:46 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 07:07 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 07:35 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 09:04 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 11:30 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 11:43 AM
Controller in a subfolder per user guide is not working - by El Forum - 02-07-2009, 12:13 PM
Controller in a subfolder per user guide is not working - by El Forum - 02-26-2009, 08:08 PM
Controller in a subfolder per user guide is not working - by El Forum - 02-26-2009, 08:15 PM
Controller in a subfolder per user guide is not working - by El Forum - 06-25-2009, 07:16 AM
Controller in a subfolder per user guide is not working - by El Forum - 06-25-2009, 07:51 AM
Controller in a subfolder per user guide is not working - by El Forum - 05-09-2010, 05:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB