Clever, thanks! Working pretty well :) Is there any way to print a variable to the error log so I can debug some more-complicated logic with setting things? How on earth can try_files be more efficient than a specific if-list? Doesn't it have to stat more files? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,192095,192133#msg-192133