title: Zend Framework routes with ajax friendly parameters
body: <p>I'm building a REST API with Zend Framework. I have routes setup that are mapped to all the resources I modeled. I also created a RESTful controller plugin to direct the different types of requests (PUT, GET, etc..) to the right controller action.</p>
  
  <p>I'm making ajax calls with jQuery and by default it appends GET parameters to the URL for the ajax call. I want to pass along these parameters as filters on my resources. </p>
  
  <p><strong>How can I get Zend Framework to pass these parameters into my controllers? Hoping not to have to write a controller plugin to make this work...</strong></p>
  
  <h3>Working URL</h3>
  
  <pre><code>http://myapp.com/catalog/products/categories/max_results/20/start_index/5
  </code></pre>
  
  <h3>What I Want</h3>
  
  <pre><code>http://myapp.com/catalog/products/categories/?max_results=20&amp;start_index=5
  </code></pre>
  
  <h3>Zend Framework Route</h3>
  
  <pre><code>routes.catalog_product_categories.type = "Zend_Controller_Router_Route"
  routes.catalog_product_categories.route = "catalog/products/categories/*"
  routes.catalog_product_categories.defaults.controller = "categories"
  routes.catalog_product_categories.defaults.action = "productcategories"
  routes.catalog_product_categories.defaults.RESTful = true
  </code></pre>