Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

156
Vistas
next redirects/rewrite with static generation

Is there a way to use redirect or rewrite statically?

I have a blog (deployed on github pages), and I have already shared the link of posts on other places, the thing is, I want to change it from myblog.com/post/slug-here to myblog.com/a/:slug-here and that's gonna break the old links i've already shared

Using the redirects() on next.config.js would be perfect, but on the docs it says that only works on Node.js environments

I also tried the rewrites()

  async rewrites() {
    return {
      fallback: [
        {
          source: '/post/:slug',
          destination: '/a/:slug',
        },
      ],
    };

(because the docs doesn't say anything about only for Node.js environments) but without luck that also didn't worked. I think the only diference between them is that rewrites() "mask" the URL to make it appear that the URL haven't changed

just in case i'm missing something: it works on yarn dev but not in production.

how could I achieve that statically generating?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda