Next.js Discord

Discord Forum

Redirects no longer work. Show 404 on source path

Unanswered
Philippine Crocodile posted this in #help-forum
Open in Discord
Philippine CrocodileOP
As of yesterday 11/18, the redirects that we've had in place no longer work once deployed to Vercel. However, they still work locally.

const nextConfig = {
  reactStrictMode: true,
  async redirects() {
    return [
      {
        source: '/test',
        destination: '/shop/',
        permanent: true,
      },
    ];
  },
};


Possibly related to https://github.com/vercel/vercel/pull/12599 ?

2 Replies

Philippine CrocodileOP
The only change I see in the build logs between the working and non-working deployment is

Vercel CLI 39.0.2 -> Vercel CLI 39.0.3
Philippine CrocodileOP
Confirming that manually building with Vercel CLI 39.0.2 fixes the issue and redirects now work again