페이지 요청이 들어온 path를 다른 path로 매핑시켜준다.
즉 /blog
페이지를 홈 경로인 /
로 설정하고 싶다면 next.config.js 파일에 아래와 같이 설정해주면 된다.
module.exports = {
async rewrites() {
return [
{
source: '/blog',
destination: '/',
},
]
},
}
https://nextjs.org/docs/api-reference/next.config.js/rewrites