[eluser]smilie[/eluser]
Hi all,
I am really having problems gasping the concept of routing in CI.
What I have is:
-application
- controllers
- subdirectory1
- controller1.php
- controller2.php
- subdirectory2
- controller3.php
- controller4.php
-controller5.php
Now, problem is:
When I link some page (a href) I do:
Code:
<a href="subdirectory1/controller1"><?=$this->lang->line('admin');?></a>
This works fine. But 'somehow' CI remembers that subdirectory, so when I click other link like:
Code:
<a href="controller5"><?=$this->lang->line('reports');?></a>
Then CI makes automatically "subdirectory1/controller5" from it - but it can not be found (because controller5.php is not in a subdirectory). Even worse, when I click on controller1 (above link) I get subdirectory1/subdirectory1/controller1
My Routes.php
Code:
$route['default_controller'] = "home";
$route['scaffolding_trigger'] = "";
$route['admim'] = "admin";
So - could someone (preferably with a example) point how do I achieve to use controllers in subdirectories? :-)
Thanks!
Smilie