title: How to change the Host used in route generation for a twig template?
body: <p>Ok so i have a controller with an action and 2 routes associated with it:</p>
  
  <pre><code>/**
   * @Route("/index/preview/", name="mybundle.preview_index")
   * @Route("/", name="mybundle.index")
   * @Template
   */
  public function indexAction(Request $request)
  {
      $preview = ($request-&gt;get('_route') === 'mybundle.preview_index');
      $host = $request-&gt;getHttpHost(); //domain.com
      if(!$preivew){
          $host = 'domain2.com';
      }
      return array(
          'preivew' =&gt; $preview,
          'host' =&gt; $host,
          'basePath' =&gt; $preview?'mybundle.preview_':'mybundle.',
      );
  }
  </code></pre>
  
  <p>Then I want to generate a route inside the twig template depending on the host:</p>
  
  <pre><code>{{ path(basePath~'index') }}
  //Then somehow pass the host to this so that i get the intended domain
  </code></pre>
  
  <p>If I was accessing this route using the preview route then i would get:</p>
  
  <pre><code>domain.com/index/preview/
  </code></pre>
  
  <p>But if i wasnt it would give me:</p>
  
  <pre><code>domain2.com/
  </code></pre>
  
  <p><strong>What I Have Tried</strong></p>
  
  <ul>
  <li>Setting the router context from within the controller, but that doesnt change routes generated in twig</li>
  </ul>