Visite: domain.com/folder/abc - > domain.com/folder/filenam.php?url=abc
//this is inside the http block
map $request_uri $request_basename {
~/(?<captured_request_basename>[^/?]*)(?:\?|$)
$captured_request_basename;
}
server {
[snip]
location /folder {
try_files folder folder/ /folder/filename.php?url=$request_basename;
}
}