try_files question... or alternative?

Steve Holdoway steve at greengecko.co.nz
Mon Jun 17 22:05:07 UTC 2013


Is there a simple way of getting nginx to search for the index when
given a bare directory as URL?

eg in a server block...

   index       index.php index.html index.htm;

when passed an URL of http://www.example.com/sub where there is no 

   location /sub {} block

it looks for http://www.example.com/sub/index.php etc...

Cheers,

Steve

-- 
Steve Holdoway BSc(Hons) MNZCS 
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa



More information about the nginx mailing list