I know this will be a bit of a pain but the way I can think of doing it in that case is something along the lines of:
location = /test {
rewrite ^(.*)$ /test.txt;
}
location = / {
limit_req zone=myzone burst=3 nodelay;
index lala.html;
}
location ~ /somesite {
rewrite ^(.*)$ /somesite.txt;
}
location = /somesite.txt {
limit_req zone=myzone burst=3 nodelay;
}
location = /test.txt {
limit_req zone=myzone burst=3 nodelay;
}
location = /test {
rewrite ^(.*)$ /test.txt;
}
location = / {
limit_req zone=myzone burst=3 nodelay;
index lala.html;
}
location ~ /somesite {
rewrite ^(.*)$ /somesite.txt;
}
location = /somesite.txt {
limit_req zone=myzone burst=3 nodelay;
}
location = /test.txt {
limit_req zone=myzone burst=3 nodelay;
}