Targeting homepage (not sub pages/dirs/)

Lorenzo Raffio multiformeingegno at
Fri Jan 17 17:40:37 UTC 2014

What should I add to this directive to target also the home page (root of
the website, e.g.
I already have 'index.php' in the directive but what if I visit /index.php)?

if ($request_uri ~*

I think I need to add another if, this time not with ~* though but with =
Something like

if ($request_uri = "(/)")


Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list