title: Changing baseURL in symfony of all controllers
body: <p>So I'm hosting my application in a subdirectory on apache server under <code>/~test/</code>
  I've tried adding prefix in routes with nothing happening</p>
  
  <p>I want all routes of all my controllers to start with <code>/~test/</code> without me adding that manually to each route. Right now when a route goes to / it goes outside of my <code>/~test/</code> directory</p>
  
  <p>for example:</p>
  
  <pre><code>  /**
       * @Route("/login", name="app_login")
       */
      public function login(AuthenticationUtils $authenticationUtils): Response
      {
      }
  </code></pre>
  
  <p>This route I'd want to go to <code>/~test/login</code></p>
  
  <p>My .htaccess:</p>
  
  <pre><code>DirectoryIndex index.php
  
  &lt;IfModule mod_negotiation.c&gt;
      Options -MultiViews
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
  
      RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
      RewriteRule ^(.*) - [E=BASE:%1]
  
      RewriteCond %{HTTP:Authorization} .
      RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
      RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
  
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule ^ - [L]
  
      RewriteRule ^ %{ENV:BASE}/index.php [L]
  &lt;/IfModule&gt;
  
  &lt;IfModule !mod_rewrite.c&gt;
      &lt;IfModule mod_alias.c&gt;
          RedirectMatch 307 ^/$ /index.php/
      &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  </code></pre>