The old link to site.com/asdf/qwer has changed to site.com/qwer
But user applications continue to access the old address. How to remove /asdf
from url via nginx ?
location ~ /asdf/ {
rewrite ^/asdf/(.*)$ /$1 break;
proxy_pass...;
#or
#root /....;
}
Or just
rewrite ^/asdf/(.*)$ /$1 break;
Most likely the second option with one rewrite in the server section is enough. Depends on the rest of the configuration.