rewrite ^/(.+)-([a-z])$ /$2/$1.html permanent;
А он вообще есть у меня?
location = / {
content_by_lua_file /var/www/html/index.lua;
lua_code_cache off;
}
location ~ ^/[0-9]+
{
rewrite ^/([0-9]+)[^0-9]*$ /$1.html;
}