title: Image rewrite on NGINX
body: <p>I have an application on nginx. A website linked to a image on our website that we need to do a rewrite to a new one:</p>
  
  <pre><code>From: /static/v20/images/lorem/ipsum/square6.png
  To: /static/v31/images/ipsum/example/square8.png
  </code></pre>
  
  <p>This is what I tried:</p>
  
  <pre><code>rewrite ^/static/(.*)/images/lorem/ipsum/(.*).png
      /static/v31/images/ipsum/example/$2.png;
  </code></pre>
  
  <p>How I can do it?</p>
  
  <p>Thank you!</p>