title: ZF2 Child route issues
body: <p>I am trying to get some basic routing done in ZF2 but I am running into some problems.</p>
  
  <p>The section that is giving me trouble is this:</p>
  
  <pre><code>'parent-categories' =&gt; array(
      'type' =&gt; 'literal',
      'options' =&gt; array(
          'route' =&gt; '/kategorier/',
          'defaults' =&gt; array(
              'controller' =&gt; 'categories',
              'action' =&gt; 'parent-categories',
          ),
      ),
      'may_terminate' =&gt; true,
      'child_routes' =&gt; array(
          'child-categories' =&gt; array(
              'type' =&gt; 'segment',
              'options' =&gt; array(
                  'route' =&gt; '/kategorier[/:slug][/:parentCategoryid]/',
                  'constraints' =&gt; array(
                      'parentCategoryid' =&gt; '[0-9]+',
                  ),
                  'defaults' =&gt; array(
                      'controller' =&gt; 'categories',
                      'action' =&gt; 'child-categories',
                  )
              ),
          ),
      ),
  ),
  </code></pre>
  
  <p>The original 'parent-categories' route works just fine, no problem. The problem though is the child-categories route isn't doing anything. I have the URL:</p>
  
  <blockquote>
    <p>/kategorier/test-test-test-test-test/1/</p>
  </blockquote>
  
  <p>but this is never matched to anything. I get the error:</p>
  
  <blockquote>
    <p>The requested URL could not be matched by routing.</p>
  </blockquote>
  
  <p>If I take the child-categories route out of the "child_routes" section, it always catches the request, even if the url is only /kategorier/. Can anyone see what I am doing wrong here?</p>