Welcome Guest, Not a member yet? Register   Sign In
Organizing Controllers into Sub-Directories
#1

I'm looking to organize controllers into sub-directories per instructions at http://www.codeigniter.com/userguide3/ge...irectories

However, it doesn't work and I'm not sure what's missing.

Going to http://www.foo.com/members goes to the member login page as expected.
Going to http://www.foo.com/members/summary gives a 404 error. Putting the logic for summary inside of controllers/Members.php works but there will be many more files and related logic so it's better if I can organize into sub-directories.

Folder structure (simplified):
Code:
-www
--application
---controllers
----members
-----Summary.php (should show member summary info... not working)
----Members.php (contains login form and logic... works)
--views
---members
----login.php (called from Members.php controller... works)
----summary.php (should be called from members/Summary.php controller... not working)
--assets
--system
--.htaccess

.htaccess file:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

What is the best to adjust to get this working? the .htaccess file? the routes.php file? readjust the folder structure? something else? Thank you in advance!
Reply


Messages In This Thread
Organizing Controllers into Sub-Directories - by eci35 - 04-30-2015, 11:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB