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

269
Vistas
Can i achieve dynamic routing in nextJS for nested routes with unknown number of slugs?

In nextJS routing is path based for pages but is there anyway to achieve a common route for following:

http://localhost/abc/element/id
http://localhost/abc/def/element/id
http://localhost/abc/def/ghi/element/id

Note how /element/id is common in all

I understand i can make nested folder structure and redirect them to same component but i want to avoid the same as we can further more nesting.

Do take care that you can not use catch all as it should be at the end just before file extension. Also, i don't want to add an extra prefix to the URL as that makes the older url's invalid.

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