Welcome Guest, Not a member yet? Register   Sign In
Multi-level subfolders for controllers in CI 2.x
#12

[eluser]Unknown[/eluser]
[quote author="nizzle" date="1322561517"]This does not seem to work when you want to use parts of the URI as query strings

like so: /sub/dir/my_controller/argument1/argument2

I would like this to call /sub/dir/my_controller->index(argument1, argument2)

but it does not work.

I need to put the index in the URL explicitly: /sub/dir/my_controller/index/argument1/argument2 [/quote]

I found a solution about this issue.

You should probably set this below code into your 'application/config/routes.php'

$route['sub/dir/my_controller/(:any)/(:any)'] = 'sub/dir/my_controller/index/$1/$2';


Hope this can help anyone.


Messages In This Thread
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-01-2011, 01:23 PM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-02-2011, 10:52 PM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-03-2011, 02:25 PM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-03-2011, 03:22 PM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-05-2011, 03:14 AM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-05-2011, 03:34 AM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-06-2011, 07:06 AM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-06-2011, 07:08 AM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 06-06-2011, 07:19 AM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 01-24-2012, 06:04 PM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 01-24-2012, 09:46 PM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 12-27-2012, 01:53 AM
Multi-level subfolders for controllers in CI 2.x - by El Forum - 02-28-2013, 05:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB