<div>Thanks Igor. That is OK, and I had a think and use the following commands instead:</div><div><br></div><div>location /entry1 {</div><div> if ( ! $remote_addr ~ "^(127\.0\.0|10\.10\.10)" ) { return 403; }</div>
<div>
rewrite ***</div><div>}</div><div><br></div><div><div class="gmail_quote">On Wed, Nov 9, 2011 at 10:42 PM, Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru" target="_blank">igor@sysoev.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Wed, Nov 09, 2011 at 10:35:44PM +0800, li zJay wrote:<br>
> In the following simple case:<br>
><br>
> location /entry1 {<br>
> allow 127.0.0.1;<br>
</div><div>> deny all;<br>
> rewrite ***;<br>
> }<br>
><br>
> the allow/deny command has no effect. Is that because rewrite command works<br>
> in the earlier phase?<br>
<br>
</div>Yes, rewrites run before allow/deny.<br>
<font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><br>
</div>