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

320
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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