Answer the question
In order to leave comments, you need to log in
How to add a 301 redirect to Next.js?
How to add a redirect from http to https in Next.js 301?
Example - -
из этого "http://stackoverflow.com/" в "https://stackoverflow.com/" ?
res.writeHead(301, { Location: `https://${req?.headers.host}/${asPath}` })
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question