Skip to content

Commit 9723f6c

Browse files
committed
chore: add chained fallbacks
1 parent 4020ba3 commit 9723f6c

File tree

2 files changed

+895
-781
lines changed

2 files changed

+895
-781
lines changed

demos/custom-routes/next.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,44 @@ module.exports = {
233233
destination: '/_sport/nfl/:path*',
234234
},
235235
],
236+
fallback: [
237+
{
238+
source: '/matchfallback',
239+
destination: '/blog/1',
240+
},
241+
{
242+
source: '/externalfallback',
243+
destination: 'https://example.com',
244+
},
245+
{
246+
source: '/fallbackloop',
247+
destination: '/intermediatefallback',
248+
},
249+
{
250+
source: '/intermediatefallback',
251+
destination: '/fallbackloop',
252+
},
253+
{
254+
source: '/chainedfallback',
255+
destination: '/chain1',
256+
},
257+
{
258+
source: '/chain1',
259+
destination: '/chain2',
260+
},
261+
{
262+
source: '/chain2',
263+
destination: '/chain3',
264+
},
265+
{
266+
source: '/chain3',
267+
destination: '/chain4',
268+
},
269+
{
270+
source: '/chain4',
271+
destination: '/static/hello.txt',
272+
},
273+
],
236274
}
237275
},
238276
async redirects() {

0 commit comments

Comments
 (0)