I have a website currently on vercel and I want to move it to netlify, but the only problem is functions is not working, I have set a rewrite to functions and it does not work, the same settings is for vercel and if works perfect
@shadowgaming-backup It may not be your issue as I’ve only taken a quick glance, but one thing I see is that you’re treating the configuration for Vercel and Netlify perhaps too similar.
@shadowgaming-backup You really should read the Netlify documentation, there isn’t feature parity between Netlify and Vercel’s rewrites/redirects, they’re very different.
As I understand it the Netlify rewrite would require all the values to match and trigger.
So if you wanted placeholders to be optional it would require specifying other rules like:
I believe by ?viewbox=auto, you mean that some requests will have it appended like /:iconSlug?viewbox=auto. Netlify’s system would automatically pass that through (as per the documentation here), and you’d only need to specify it if you were doing something specific.
I think one major difference is that Vercel’s system appears to automatically convert the :value items into query string parameters, which is not the case on Netlify.
Note that since it is Next.js it runs other middleware to provide various Next.js functionality.
This means that it isn’t really the standard Netlify experience, so if Next.js has logic sitting between the request and Netlify’s redirects/rewrites engine they may not occur at all.
I don’t see it listed as a limitation on this page: