title: My symfony2 controller is not redirecting
body: <p>I have created one defaultcontroller which is given below</p>
  
  <pre><code>namespace Mytest\VameBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Symfony\Component\HttpFoundation\Response;
  
  class DefaultController extends Controller
  {
  public function indexAction()
  {
      return $this-&gt;redirect($this-&gt;generateUrl('home'));
  }
  
  public function myactionAction($name)
  {
      return new Response('&lt;html&gt;&lt;body&gt;'.$name.'&lt;/body&gt;&lt;/html&gt;');
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The routing file is as look like bellow.</p>
  
  <pre><code>use Symfony\Component\Routing\RouteCollection;
  use Symfony\Component\Routing\Route;
  
  
  $collection = new RouteCollection();
  
  $collection-&gt;add('name', new Route('/vame',array(
      '_controller' =&gt; 'MytestVameBundle:Default:index',
      )));
  
  $collection-&gt;add('home', new Route('/vame/{name}',array(
      '_controller' =&gt; 'MytestVameBundle:Default:myaction',
      'name' =&gt; 'hhhhhhhhhh',
  </code></pre>
  
  <p>)));</p>
  
  <pre><code>return $collection;
  </code></pre>
  
  <p>It shows the following error</p>
  
  <p><strong>The page isn't redirecting properly</strong></p>
  
  <p>What i want to do is once the default controller is called with index action it will redirect to myaction Action with one argument.</p>
  
  <p>so please any help... </p>