title: Nginx rewrite rules additional arguments
body: <p>I'm breaking my head on Nginx rewrite rules while migrating from Apache to Nginx.</p>
  
  <p>I had .htaccess rewrite rules that made <code>/search/foo+bar/2&amp;pricerange=20-50</code> to <code>search.php?search=foo+bar&amp;page=2&amp;pricerange=20-50</code>
  and I could access all the arguments like you would expect with <code>$_GET['search'], $_GET['page'] and $_GET['pricerange']</code></p>
  
  <p>But now with Nginx I have issues with this appended arguments like pricerange. Whenever I visit <code>/search/foo+bar/2&amp;pricerange=20-50</code> it does not translate the pricerange argument.
  And when I visit the same url without the page number the pricerange argument gets added to the search argument. But only when I'm using more than one word concatenated with +'s.</p>
  
  <p>My current Nginx rewrite rules:</p>
  
  <p><code>location / {
      try_files $uri /index.php$is_args$args;
      rewrite ^/search/(.*)/(.*)/$ /search?search=$1&amp;page=$2 last;
      rewrite ^/search/(.*)/(.*)/?$ /search?search=$1&amp;page=$2 last;
      rewrite ^/search/(.*)/$ /search?search=$1 last;
      rewrite ^/search/(.*)/?$ /search?search=$1 last;
  }</code></p>