title: Symfony, how to define homepage route
body: <p>I created a <code>HomeController</code> to show my homepage</p>
  <pre><code>class HomeController extends AbstractController
  {
      #[Route('/{page?}', name: 'home')]
  public function index(PostRepository $pr, EntityManagerInterface $em, $page, ): Response
      {
  …
  }
  }
  
      
  </code></pre>
  <p>So far so good. But this stops working when I create a second page because it will always be catched by the home route.</p>
  <p>For example my security controller always get's redirected to home when called with path('app_login')</p>
  <pre><code>class SecurityController extends AbstractController
  {
      /**
       * @Route(&quot;/login&quot;, name=&quot;app_login&quot;)
       */
      public function login(AuthenticationUtils $authenticationUtils): Response
      {
  </code></pre>
  <p>It seems like the home route is too greedy and catches almost everything.</p>