-1

we have built UI using react js framework and html +css + js code is deployed inside apache 2. When I browse website it works fine but if I refresh page then I get 404. Can someone tell me how can I fix it.

hitesh
  • 449
  • 3
  • 11
  • 26

2 Answers2

0

If you are using React-Router you are probably having this problem: React-router urls don't work when refreshing or writting manually.

You can also see the React Router tutorial for how to set up a production Express server.

Community
  • 1
  • 1
0

Perhaps this answer is relevant to you:

Apache web server doesn't allow me to refresh on /about but on localhost its working fine

I know I also had problems related to HTML5 mode when first setting up react-router.

Community
  • 1
  • 1
ksliu25
  • 114
  • 1
  • 1
  • 6