React Router BrowserRouter leads to “404 Not Found - nginx ” error when going to subpage directly without through a home-page click

后端 未结 5 997
旧巷少年郎
旧巷少年郎 2020-12-05 00:10

I am using React Router for routing for a multi-page website. When trying to go to a sub page directly https://test0809.herokuapp.com/signin you\'d get a \"404 Not Found -ng

5条回答
  •  长情又很酷
    2020-12-05 00:49

    You can see my project: https://github.com/hongnguyenhuu96/honnh96 where you should put all codes in your create-react-app folder to react-ui folder and keep the others unchange. After that deloy to heroku, remember to config the deploy evironment to nodejs. It will works, good luck! It also deployed on heroku at: http://hongnh.herokuapp.com/

提交回复
热议问题