next.js/test/e2e/app-dir/rewrite-headers/next.config.js
next.config.js28 lines572 B
/** @type {import('next').NextConfig} */
module.exports = {
  rewrites: async () => {
    return [
      {
        source: '/hello/sam',
        destination: '/hello/samantha',
      },
      {
        source: '/hello/other',
        destination: '/other',
      },
      {
        source: '/hello/fred',
        destination: '/other?key=value',
      },
      {
        source: '/hello/(.*)/google',
        destination: 'https://www.google.$1/',
      },
      {
        source: '/rewrites-to-query/:name',
        destination: '/other?key=:name',
      },
    ]
  },
}
Quest for Codev2.0.0
/
SIGN IN