title: Why this ZF2 router doesn't match this two child routes?
body: <p>What is wrong in this router:</p>
  
  <pre><code>    'routes' =&gt; array(
          'home' =&gt; array(
              'type' =&gt; 'Zend\Mvc\Router\Http\Literal',
              'options' =&gt; array(
                  'route'    =&gt; '/',
                  'defaults' =&gt; array(
                      'controller' =&gt; 'Application\Controller\Index',
                      'action'     =&gt; 'index',
                  ),
              ),
          ),
          'application' =&gt; array(
              'type'    =&gt; 'Literal',
              'options' =&gt; array(
                  'route'    =&gt; '/application',
                  'defaults' =&gt; array(
                      '__NAMESPACE__' =&gt; 'Application\Controller',
                      'controller'    =&gt; 'Index',
                      'action'        =&gt; 'index',
                  ),
              ),
              'may_terminate' =&gt; true,
              'child_routes' =&gt; array(
                  'default' =&gt; array(
                      'type'    =&gt; 'Segment',
                      'options' =&gt; array(
                          'route'    =&gt; '/[:controller[/:action]]',
                          'constraints' =&gt; array(
                              'controller' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                              'action'     =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                          ),
                          'defaults' =&gt; array(
                          ),
                      ),
                  ),
              ),
          ),
          'api'         =&gt; array(
              'type'    =&gt; 'Literal',
              'options' =&gt; array(
                  'route'    =&gt; '/api',
                  'defaults' =&gt; array(
                      '__NAMESPACE__' =&gt; 'Application\Controller',
                      'controller'    =&gt; 'Api',
                      'action'        =&gt; 'index',                 
                  ),
                  'may_terminate' =&gt; true,
                  'child_routes'  =&gt; array(
                      'post' =&gt; array(
                          'type'    =&gt; 'Segment',
                          'options' =&gt; array(
                              'route'    =&gt; '/post/:id',
                              'constraints' =&gt; array(
                                      'id'     =&gt; '[0-9]+',
                              ),
                              'defaults' =&gt; array(
                                      'controller' =&gt; 'Application\Controller\Api',
                                      'action'     =&gt; 'post',
                              ),
                          ),
                      ),  
                      'page' =&gt; array(
                          'type'    =&gt; 'Segment',
                          'options' =&gt; array(
                              'route'    =&gt; '/page/:name',
                              'constraints' =&gt; array(
                                      'name'     =&gt; '[a-zA-Z]+',
                              ),
                              'defaults' =&gt; array(
                                      'controller' =&gt; 'Application\Controller\Api',
                                      'action'     =&gt; 'page',
                              ),
                          ),
                      ),
                  ),
              ),
          ),  
      ),
  </code></pre>
  
  <p>I can't route to <a href="http://example.com/api/post/0" rel="nofollow">http://example.com/api/post/0</a> and to <a href="http://example.com/api/page/pagename" rel="nofollow">http://example.com/api/page/pagename</a> ? 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.</p>