Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

262
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda