To redirect a subdirectory in NGINX, use this location block (an example for https):
location /old-subdirectory {
return 301 https://$server_name/new-subdirectory/;
}
For more NGINX redirects see this post: RegEx Bliss: Set Up URL Redirects in NGINX Using Regular Expressions without Rewrites.
