I know that there are countless threads about this, but I would appreciate a quick pointer to explain what I am missing here. I have a controller called Controller_Index_Orders which resides in /conroller/orders/index.php. It has one method action_index(). I then have the following Route code for it:
Route::set('orders', 'orders(/<action>)')
->defaults(array(
'controller' => 'orders',
'action' => 'index',
));
When I go to baseUrl/orders/ or baseUrl/orders I am getting a 404. What am I missing here?
EDIT:
Controller_Orders is now in /controllers/orders.php Route as follows:
Route::set('orders', 'orders(/<action>)')
->defaults(array(
'controller' => 'orders',
'action' => 'index',
));
Going to baseUrl/orders or baseUrl/orders/ still not functioning.
EDIT2:
Default Route.
Route::set(‘default’, ‘((/(/)))’)
->defaults(array(
‘controller’ => ‘index’,
‘action’ => ‘index’,
));
Your naming is all screwed up. If you have a controller called
Controller_Index_Ordersit should reside inclasses/controller/index/orders.php. You’ll also need to specify the proper controller in your route:'controller' => 'index_orders'. You might have to throw adirectorykey in there too.