title: How to transform (rewrite) part of URL in nginx
body: <p>I'm trying to redirect traffic to our new server but the old server (Mac OS) used case insensitive file names while the new (embedded) one uses Linux (case sensitive).
  My problem is to redirect traffic from:</p>
  
  <pre><code>http://server.com/NEW/variable_url
  </code></pre>
  
  <p>to 
  <code>http://server.com/new/variable_url</code></p>
  
  <p>(note the lower 'new').</p>
  
  <p>I would like to be able to do this for nginx without using perl or lua or other modules as this server is running in an embedded environment.</p>
  
  <p>So far I tried:</p>
  
  <pre><code> location ~* ^/new/ {
         access_log /var/log/nginx/new.log combined;
          rewrite ^/new/(.*)$ $1 permanent;
       }
  </code></pre>
  
  <p>without success.</p>