Welcome Guest, Not a member yet? Register   Sign In
URL segments with pure navigational purpose (no controller)
#5

[eluser]pickupman[/eluser]
Buso has the correct solution otherwise you will end up with a bunch of directories with CI files are at least subfolders with each having a index.php from default CI webroot. The routes feature is awesome, once you start using it.

Example: Say you want to have admin code in each controller, to help modularize your code. You can use routes like
Code:
$route['admin/(:any)/(:any)'] = '$1/admin/$2';
$route['admin/(:any)'] = '$1/admin';

Now any url using example.com/admin/user will be sent to "user" controller and "admin" method. The third parameter will handle what action you can take in admin method.


Messages In This Thread
URL segments with pure navigational purpose (no controller) - by El Forum - 06-28-2010, 06:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB