how can i add a default home page in routing?
my route works when i access this url {myapp}/modulename/controllername but when i access this {myapp}/modulename it returns a 404.
How can i fix that?
return array( 'controllers' => array( 'invokables' => array( 'Modulename\Controller\Mycontroller' => 'Modulename\Controller\TheController', ), ), 'router' => array( 'routes' => array( 'modulename' => array( 'type' => 'Literal', 'options' => array( 'route' => '/modulename', 'defaults' => array( '__NAMESPACE__' => 'Modulename\Controller', 'controller' => 'My', 'action' => 'index', ), ), 'may_terminate' => true, 'child_routes' => array( 'thechild' => array( 'type' => 'Segment', 'options' => array( 'route' => '[/:controller][/:action][/:id]', 'constraints' => array( 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', 'id' => '[0-9]*', ), 'defaults' => array( '__NAMESPACE__' => 'Modulename\Controller', 'controller' => 'User', 'action' => 'index', ), ), ), ), ), ), ), 'view_manager' => array( 'template_path_stack' => array( 'users' => __DIR__.'/../view', ), 'display_exceptions' => true, ), );