specific to index.php rest of them index.html

Richard Stanway r1ch+nginx at teamliquid.net
Mon Oct 3 12:40:19 UTC 2016


Why not use the location directive? This is what it is designed for.

http://nginx.org/en/docs/http/ngx_http_core_module.html#location


On Mon, Oct 3, 2016 at 12:28 PM, Tseveendorj Ochirlantuu <
tseveendorj at gmail.com> wrote:

> Hello,
>
> I need to configure some locations go to index.php rest go to index.html
>
>
> if ($request_uri !~ ^/(location1|location2|location3)$ ) {
>                   rewrite ^(.*) /index.html;
> }
>
> but how to else ?
>
> if the request contains location1, location2, location3 goes to
> fastcgi_pass 127.0.0.1:9000;
> if not contain go to /index.html
>
> regards,
> tseveen
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161003/7aee62f8/attachment.html>


More information about the nginx mailing list