I have a fairly simple rewrite rule in my NextJS site, which should rewrite /country/:country-info to /country/:country.
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'firebasestorage.googleapis.com',
}
]
},
async rewrites() {
return [
{
source: '/country/:country*-info',
destination: '/country/:country*'
}
]
},
}
This works as expected on my localhost, and when deployed on Vercel. However when I deploy the same configuration on Netlify, the rewrites aren’t working.
According to their documentation (Next.js redirects and rewrites on Netlify | Netlify Docs), this should just work out of the box.
