run yarn dev
the navigate to http://localhost:3000/old-url?code=123. See that you are redirected to http://localhost:3000/new-url?code=123 and the text "Code is 123" displays on screen.
mkorostoff / next-redirect Goto Github PK
View Code? Open in Web Editor NEWQuick example how to redirect with nextjs