title: Nginx - Need regex to append a parameter to url
body: <p>I have been stuck on a regex. I want to append <code>foo=1</code> to all URLs.</p>
  
  <p>For a URL like:</p>
  
  <pre><code>www.xyz.com/
  Rewrite:
  www.xyz.com/?foo=1
  </code></pre>
  
  <p>For a URL like:</p>
  
  <pre><code>www.xyz.com/?abc=2
  Rewrite:
  www.xyz.com/?abc=2&amp;foo=1
  </code></pre>