Created
September 27, 2021 21:13
-
-
Save adrienharnay/e67f328d0e827eb1008f16e9d98ecbe6 to your computer and use it in GitHub Desktop.
test Next.js host redirection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rewrites: () => { | |
return { | |
beforeFiles: [ | |
{ | |
source: '/', | |
has: [ | |
{ | |
type: 'host', | |
value: `garage-(?<slug>.*).ad-ad-fr-review-test-redir-khdq54.review.ad.fr`, | |
}, | |
], | |
destination: `https://ad-ad-fr-review-test-redir-khdq54.review.ad.fr/garage/garage-:slug`, | |
}, | |
{ | |
source: '/:path*', | |
has: [ | |
{ | |
type: 'host', | |
value: `garage-(?<slug>.*).ad-ad-fr-review-test-redir-khdq54.review.ad.fr`, | |
}, | |
], | |
destination: `https://ad-ad-fr-review-test-redir-khdq54.review.ad.fr/garage/garage-:slug/:path`, | |
}, | |
], | |
fallback: [ | |
{ | |
source: '/:path*', | |
destination: `${process.env.SITE_URL}/:path*`, | |
}, | |
], | |
}; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment