title: Variable on a prefix on symfony2 routing
body: <p>I need a variable on a prefix on my symfony2 routing so that i can do something like this in the main routing file:</p>
  
  <pre><code>//app/config/routing.yml
  god:
      resource: "@Acme/DemoBundle/Resources/config/routing.yml"
      prefix: /god/{religion}
  </code></pre>
  
  <p>and then something like this in the bundle routing file:</p>
  
  <pre><code>gods_route_to_heaven:
      path: /path_to_heaven
      defaults: { _controller: AcmeBlogBundle:God:show }
  </code></pre>
  
  <p>so that i can access paths like this:</p>
  
  <pre><code>/god/Christianity/path_to_heaven
  /god/Islam/path_to_heaven
  /god/Hinduism/path_to_heaven
  </code></pre>
  
  <p>and so on.</p>
  
  <p>If i type <code>app/console route:debug | grep api</code> on the console i get the correct route <code>/god/{religion}/path_to_heaven</code>, so the route is being generated correctly.</p>
  
  <p>But when I try to get the parameter in the controller by placing it as an input in the action function like this:</p>
  
  <pre><code>public function showAction($religion)
  </code></pre>
  
  <p>the path gets corrupted and dumping the paths i see it gets duplicated: <code>/god/{religion}/path_to_heaven/{religion}</code></p>
  
  <p>So how would i get the $religion variable from inside the controller?</p>