1.Add this code to the middlewares section of nuxt.config.js:
2.Configure it:
      serverMiddleware: [{ 
      path: '/',
      handler: './serverMiddleware.js'
  }]
  
3.Create serverMiddleware.js in middleware folder
      export default (req, res, next) => {
  // detect urls you'd like to redirect
  // call res.redirect(CODE, NEWURL)

  if (req.url === '/old-page/') {
    res.writeHead(301, { Location: 'new-page' });
    res.end();
  } else {
    next();
  }
}