<div dir="ltr">Why not use the location directive? This is what it is designed for.<div><br></div><div><a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#location">http://nginx.org/en/docs/http/ngx_http_core_module.html#location</a><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 3, 2016 at 12:28 PM, Tseveendorj Ochirlantuu <span dir="ltr"><<a href="mailto:tseveendorj@gmail.com" target="_blank">tseveendorj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I need to configure some locations go to index.php rest go to index.html</div><div><br></div><div><br></div><div>if ($request_uri !~ ^/(location1|location2|<wbr>location3)$ ) {</div><div>                  rewrite ^(.*) /index.html;</div><div>}</div><div><br></div><div>but how to else ?</div><div><br></div><div>if the request contains location1, location2, location3 goes to fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;</div><div>if not contain go to /index.html</div><div><br></div><div>regards,</div><div>tseveen</div></div>
<br>______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br></blockquote></div><br></div>