title: Can I reformat my URL parameters with Varnish
body: <p>I have a relatively simple (I think) use-case but I can't find any examples where someone has done this. We are using Varnish as a cache and reverse proxy in front of two different applications and would like to make things a bit more unified across both as they both do similar things. I was hoping Varnish could help rewrite the URLs as shown below.</p>
  
  <p>Original application URL for pagination (get first 10 items):</p>
  
  <pre><code>http://myapplication.com/products/?startindex=1&amp;endindex=10
  </code></pre>
  
  <p>Desired URL:</p>
  
  <pre><code>http://myapplication.com/products/?paginate=1:10
  </code></pre>
  
  <p>This is just one example (the most complex because it combines two parameters), but in all cases the input values for the parameters stay the same, it is just that the parameter names will change.</p>
  
  <p>Another example would be:</p>
  
  <pre><code>http://myapplication.com/search/?query=something
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>http://myapplication.com/search/?q=something
  </code></pre>
  
  <p>Does anyone have any experience with varnish and how this could be done?</p>
  
  <p>Thanks</p>