What is wrong in this router:
'routes' => array(
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'index',
),
),
),
'application' => array(
'type' => 'Literal',
'options' => array(
'route' => '/application',
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Index',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
),
),
),
),
),
'api' => array(
'type' => 'Literal',
'options' => array(
'route' => '/api',
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Api',
'action' => 'index',
),
'may_terminate' => true,
'child_routes' => array(
'post' => array(
'type' => 'Segment',
'options' => array(
'route' => '/post/:id',
'constraints' => array(
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'Application\Controller\Api',
'action' => 'post',
),
),
),
'page' => array(
'type' => 'Segment',
'options' => array(
'route' => '/page/:name',
'constraints' => array(
'name' => '[a-zA-Z]+',
),
'defaults' => array(
'controller' => 'Application\Controller\Api',
'action' => 'page',
),
),
),
),
),
),
),
I can't route to http://example.com/api/post/0 and to http://example.com/api/page/pagename ? zend framework 2 response with 404 - page not found - "The requested URL could not be matched by routing". thpse two routes are in router definition.