title: Symfony2 routing error No route found for "GET /query"
body: <p>I'm having problems with creating new routes in Symfony2 v2.3. I get error message</p>
  
  <pre><code>No route found for "GET /query"
  404 Not Found - NotFoundHttpException
  1 linked Exception: ResourceNotFoundException »
  </code></pre>
  
  <p>I've searched for solutions but none of it worked... I even crashed a server experimenting with appDevUrlGenerator.php and appDevUrlMatcher.php.</p>
  
  <p>So, here is part of the code in my DefaultController:</p>
  
  <pre><code>public function queryAction(Request $request)
  {
      $repository=$this-&gt;getDoctrine()-&gt;getRepository('TestFirstBundle:UserTicket');
  
  
      $lists = $repository-&gt;findBystatus('Open');
  
  
      if (!$lists) {
          throw $this-&gt;createNotFoundException(
              'No forms found '
          );
      }
  
      return $this-&gt;render('TestFirstBundle:Default:query.html.twig', array(
          'lists' =&gt; $lists,
  
      ));
  </code></pre>
  
  <p>my routing.yml inside bundle:</p>
  
  <pre><code>test_First_homepage:
  path:     /dipl
  defaults: { _controller: TestFirstBundle:Default:index }
  
  
  test_First_submit:
  path:     /subm
  defaults: { _controller: TestFirstBundle:Default:submit }
  
  test_First_query:
  path:     /query
  defaults: { _controller: TestFirstBundle:Default:query }
  </code></pre>
  
  <p>and app/config/routing.yml (I've put the same thing in app/config/routing_dev.yml)</p>
  
  <pre><code>test_first:
  resource: "@TestFirstBundle/Resources/config/routing.yml"
  prefix:   /
  </code></pre>
  
  <p>I'll just add that /dipl and /subm routes work perfectly and they are connected to indexAction and submitAction where I've put my form (which redirects after submitting form). Also, if I comment out my real indexAction and just rename queryAction to indexAction it works perfectly on /dipl url, and does exactly the right thing as queryAction should do. So I'm guessing that there is a problem in connection between queryAction and /query url. But when I run </p>
  
  <pre><code>   php app/console router:match /query 
  </code></pre>
  
  <p>I get the correct thing:</p>
  
  <pre><code>[router] Route "test_First_query"
  Name         test_First_query
  Path         /query
  Host         ANY
  Scheme       ANY
  Method       ANY
  Class        Symfony\Component\Routing\Route
  Defaults     _controller:           Test\FirstBundle\Controller\DefaultController::queryAction
  Requirements NO CUSTOM
  Options      compiler_class: Symfony\Component\Routing\RouteCompiler
  Path-Regex   #^/query$#s
  </code></pre>