React App not accessible with direct links

I used create-react-app to build a MERN app. The front-end uses create-react-app and is deployed here: https://friendly-leakey-05373b.netlify.com/

The back-end is deployed to heroku: https://blooming-beyond-66134.herokuapp.com/ (you can make a test call using https://blooming-beyond-66134.herokuapp.com/cities/all)

Once deployed to Netlify, when I navigate from / to /cities, all is fine. Once I go one level deeper to /cities/bern (example), I get a 404. When I go back to /cities, I get a 404 also.

When I go to /cities directly (without going to / before), I also get a 404.

(the github repository with the back-end and the front-end: https://github.com/sunyamare/react-ts-city-itinerary)

Any ideas? :slight_smile:

hi there, did you give this a read through already?

1 Like

Thank you @perry, that solved my issue.
I should have searched a little more before posting …

1 Like