-
-
Notifications
You must be signed in to change notification settings - Fork 458
-
I don't know if I get this:
Redirects. Caveat: every route should be able to redirect except _next/static/* and static/*, since those cache behaviors do not have Lambda handlers attached to them. Note that object format is not yet supported.
Does this mean that I can't redirect from a static page to any other or it means that I can't redirect from anywhere to a static page?
I also don't get the "object format support", what is the alternative? Is the domainRedirects from serverless config? I mean, on the nextjs docs the only format to make redirects is object as far as I can get.
I'm having issue when trying to redirect from a non-existent route to a static path, this is expected? 🤔
Beta Was this translation helpful? Give feedback.
All reactions
Yes, the new format actually refers to https://nextjs.org/docs/api-reference/next.config.js/redirects#header-cookie-and-query-matching. Let me update it to be clearer. It's not yet implemented since I hadn't a chance yet.
You cannot redirect from paths in _next/static/* and static/* as these are the static files path (like images or _next JS files) and don't have the Lambda handlers attached to it. Maybe with CloudFront functions, it should be possible (but not yet implemented)
Replies: 1 comment
-
Yes, the new format actually refers to https://nextjs.org/docs/api-reference/next.config.js/redirects#header-cookie-and-query-matching. Let me update it to be clearer. It's not yet implemented since I hadn't a chance yet.
You cannot redirect from paths in _next/static/* and static/* as these are the static files path (like images or _next JS files) and don't have the Lambda handlers attached to it. Maybe with CloudFront functions, it should be possible (but not yet implemented)
Beta Was this translation helpful? Give feedback.
All reactions
-
😄 1