Symfony Url Generator producing different URLs from the same Route before and after login : <p>I currently using Symfony Kernel and Routing within a custom framework and I have run into a curious problem. Using the same Route:</p>

<pre><code>$collection-&gt;add('article_edit', new Route('/articles/edit/{alias}', array(
    '_controller' =&gt; 'AppBundle:Article:edit'
)));
</code></pre>

<p>Using this Url Generator code</p>

<pre><code>$url = $this-&gt;generateUrl('article_edit',array('alias' =&gt; 'test'));
</code></pre>

<p>Before login, the Url Generator produces</p>

<blockquote>
  <p>/articles/edit/test</p>
</blockquote>

<p>And after login, it produces</p>

<blockquote>
  <p><a href="http://localhost/testsite/articles/edit/test">http://localhost/testsite/articles/edit/test</a></p>
</blockquote>

<p>Without anything being changed, what could be happening here since I want the same result consistently.</p>

<p>Thanks</p>
