Welcome Guest, Not a member yet? Register   Sign In
Controller directory with subfolders
#1

(This post was last modified: 02-12-2016, 08:30 AM by kaaai3.)

is there a way to make sub folders in the controller directory because i have a panel with a post controller etc

controllers
  panel
    Posts.php

pages.php
Reply
#2

(This post was last modified: 02-12-2016, 11:33 AM by InsiteFX.)

Just create a route to it, sub-folders will not work with the default controller.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(02-12-2016, 09:59 AM)InsiteFX Wrote: Just create a root to it, sub-folders will not work with the default controller.

yeah how?
Reply
#4

(This post was last modified: 02-12-2016, 10:57 AM by condor.)

I do like this:

File .htaccess in the application root:

Code:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]


application\config\config.php

Code:
$config['index_page'] = ' ';

application\config\routes.php

Code:
$route['default_controller'] = 'index';

And create folder.

application\controller\panel\

In the catalog necessary controllers.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB