# http://www.testpm.com/2019/a/1.html ==> http://www.testpm.com/2018/a/1.html location /2019 { rewrite ^/[0-9]+(/.*)$ /2018$1 permanent; } location /2018 { root /usr/share/nginx/html; }