Closed iDVB closed 2 weeks ago
What settings do I need to use in NextJS to redirect ALL 'source/path' from a host/domain to forward to the index/homepage of another domain.
this WORKS:
{ source: '/(.*)', destination: 'https://primary.domain.com', permanent: false, locale: false, has: [ { type: 'header', key: 'x-forwarded-host', value: 'other.com', }, ], },
this does NOT work:
{ source: '/:path*', destination: 'https://primary.domain.com', permanent: false, locale: false, has: [ { type: 'header', key: 'x-forwarded-host', value: 'other.com', }, ], },
it outputs location: https://primary.domain.com/undefined as response headers
location: https://primary.domain.com/undefined
BUT if you just put a trailing slash at the end ... then that WORKS....
{ source: '/:path*', destination: 'https://primary.domain.com/', permanent: false, locale: false, has: [ { type: 'header', key: 'x-forwarded-host', value: 'other.com', }, ], },
https://discord.com/channels/983865673656705025/1298382310831554560/1298662265037262930
What settings do I need to use in NextJS to redirect ALL 'source/path' from a host/domain to forward to the index/homepage of another domain.
this WORKS:
this does NOT work:
it outputs
location: https://primary.domain.com/undefined
as response headersBUT if you just put a trailing slash at the end ... then that WORKS....
https://discord.com/channels/983865673656705025/1298382310831554560/1298662265037262930