title: Nginx redirect except my IP address
body: <p>All I'm trying to do it redirect all users, apart from my ip address, to a "site down" page using the following</p>
  
  <pre><code> location / {
     rewrite (.*) /sitedown.php redirect;
      allow 94.12.147.139;
      index index.html index.php;
      try_files $uri $uri/ @handler;
      expires 30d;
  }
  </code></pre>
  
  <p>It redirects fine but won't allow my IP to access the site either. Any help would be grateful.</p>