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

317
Visualizações
Routes are not working after publishing my React Web App to Apache production server

I was execute this command:

$ npm run-script build

The initial page works well, but any link with routes (for example "login") doesn't work.

How I can change the script "build" or correct that?

Any ideas?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This is probably not a problem with your build.

I guess you are using React Routers BrowserRouter? If so, your React Application is handling the routing. That means that your Apache config has to be configured to always respond with your builds index.html for whatever url is requested.

Check out this example config: https://gist.github.com/alexsasharegan/173878f9d67055bfef63449fa7136042

Hope that helps

over 4 years ago · Santiago Trujillo Relatório
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