Reputation: 875
I dont understand how i can write logic : if file in folder exists then return;
location ~ "/((\w{2})[\w-]+\.(png|jpg))$" {
if(-f e:\\ThumbFull\\$2\\$1){
alias e:\\ThumbFull\\$2\\$1;
}
if(-f e:\\Image\\$2\\$1){
alias e:\\Image\\$2\\$1;
}
return 404;
}
Upvotes: 0
Views: 282
Reputation: 49682
You could set root
to a common parent directory (i.e. e:/
) and use try_files
to check for the file in both directories.
For example:
location ~ "/((\w{2})[\w-]+\.(png|jpg))$" {
root e:/;
try_files /ThumbFull/$2/$1 /Image/$2/$1 =404;
}
See this document for details.
Upvotes: 1