title: adding a Route to the a Router in Zend Framework
body: <p>I am using the mod-rewrite router.  </p>
  
  <p>I am trying to add a Route to the router that will convert the following url:<br>
  baseurl/category/aaa/mycontroller/myaction/param/value  </p>
  
  <p>to be:<br>
  Controller=mycontroller<br>
  action=myaction</p>
  
  <p>--parameters--   </p>
  
  <p>category=aaa<br>
  param=value  </p>
  
  <p>I am using the following (not working) in my bootstrap, _front is the frontController</p>
  
  <pre><code>$Router=$this-&gt;_front-&gt;getRouter();
  $CategoryRoute = new Zend_Controller_Router_Route('category/:category/:controller/:action/*');
  $Router-&gt;addRoute('category', $CategoryRoute);
  </code></pre>
  
  <p>The error I get is a thrown router exception when I am using the Zend_View::url() helper (with or without giving it the name of the new route).<br>
  The exception is thrown only when I have baseurl/category/....  </p>
  
  <p>What am I missing?</p>
  
  <p>What I missed:<br>
  Since there was [category] in the url, The router that was used is the one defined above.<br>
  When I used the url() helper, I didn't give any value in it to the [category] hence there was no value for this key in the url parts->failure. 
  Giving a default, makes it work.</p>