if ,-f and variables

Sean Allen sean at ardishealth.com
Wed Feb 27 19:26:56 MSK 2008


this works:

if ( -f /ah/sites/colon365.co.uk/public/.maintenance )
{
   set $maintenance 1;
}

this doesn't:

if ( -f $document_root/.maintenance )
{
   set $maintenance 1;
}

two questions,

1. is there a way to make the latter work? some slight change or tweak?
2. why doesn't it work? are variables not interpolated when doing file  
system checks like -f?







More information about the nginx mailing list