title: NGINX Redirect without rewriting the url excluding IP and directory
body: <p>We've got a page that we put up on our website when we take it down for maintenance or updates. The basic pseudocode logic looks something like this:</p>
  
  <pre><code>if IP != 72.56.43.212 and location !~ /down then
     display down/
  </code></pre>
  
  <p>It's important that the url remain intact. For example,</p>
  
  <pre><code>Address Bar: http://www.example.com/abcd.html
  Page Shown:  http://www.example.com/down
  </code></pre>
  
  <p>I'm still pretty new to NGINX configuration. Any help is appreciated.</p>