I have problem when I change url structure of site. Old structure is like xxxx.com/product/:id/:name but I have to change it to xxxx.com/product/:name/:id.
I already deploy it and google already crawled it so how can I redirect from old url structure to new or how can I delete every old urls from google.
I used App router in NextJs 13.
I try to write redirect in next.config.js but I think it not detect which part of it is id or name so it cause many redirect issue.