Tengo una aplicación existente que se implementó en https://demo.com/help y ahora quiero cambiar el dominio a https://example.com .
¿Cómo puedo realizar la redirección?
Intenté las siguientes formas;
async redirects() {
return [
{
source: '/help',
has: [
{
type: 'host',
value: '.*\\..*\\..*'
},
],
permanent: false,
destination: 'https://example.com'
}
]
},
He agregado el código anterior en next.config.js
Debe agregar basePath: false .
async redirects() {
return [
{
source: '/help',
destination: 'https://example.com',
permanent: false,
basePath: false
},
]
},