title: How to pass parameters by url with Zend Framework 2
body: <p>I'm getting into trouble with passing param by url in Zend Framework 2. For example : I want to access page by a URL like this: 
  <a href="http://example.com/student/details/aaa" rel="nofollow noreferrer">http://example.com/student/details/aaa</a> it's working, but if my url like this :
  <a href="http://example.com/student/details/1" rel="nofollow noreferrer">http://example.com/student/details/1</a> it's not working,  And  i still get a 404.</p>
  
  <p>I tried to follow the instruction from <a href="https://stackoverflow.com/questions/13353770/how-to-pass-params-using-a-route-in-zend-framework-2">how to pass params using a route in Zend Framework 2?</a> </p>
  
  <p>But it still doesn't work.</p>
  
  <p>here's my module.config.php</p>
  
  <pre><code>'student' =&gt; array(
                  'type'    =&gt; 'segment',
                  'options' =&gt; array(
                      'route'    =&gt; '/student[/:action][/:id]',
                      'constraints' =&gt; array(
                              'action' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                              'id'     =&gt; '[a-zA-Z][a-zA-Z0-9_-]*',
                      ),
                      'defaults' =&gt; array(
                              '__NAMESPACE__' =&gt; 'AppFeeder\Controller',
                              'controller'    =&gt; 'Student',
                              'action'        =&gt; 'index',
                      ),
                  ),
              ),
  </code></pre>
  
  <p>And i use this <code>$this-&gt;getEvent()-&gt;getRouteMatch()-&gt;getParam('id')</code> in my controller.</p>
  
  <p>Can anyone help me ?</p>