nginx regex match server name and redirect

CNAME: sskaje.name => sskaje.me, *.sskaje.name => sskaje.name
HTTP redirect: http://xxx.sskaje.name/aaa/bbb => http://xxx.sskaje.me/aaa/bbb

nginx regex match server name and redirect by @sskaje: https://sskaje.me/2013/10/nginx-regex-match-server-name-and-redirect/

Incoming search terms: