I'm having a little problem with some rewrite rules for a website.
My permalinks are now something like domain.com/ID/permalink-ID.html
The old structure of permalinks was domain.com/permalink-ID.html
That ID is an integer number.
How can i create a rewrite rule for nginx so that
domain.com/permalink-ID.html redirects to domain.com/ID/permalink-ID.html
I can do that manually... but there are about 25k posts like that.
Thank you