aemann2 / movie_finder

An app that pulls movie information from The MovieDB API. Shows films that are currently in theaters or coming soon. Users can also search to get info on other films. Built using Typescript, Tailwind, and the Context API w/ Hooks.
https://movie-finder-moviedb.netlify.app/
0 stars 0 forks source link

404 returned when hitting routes other than / #4

Closed aemann2 closed 3 years ago

aemann2 commented 3 years ago

The app works normally when visiting the main route:

https://movie-finder-moviedb.netlify.app/

Entering these URLs directly, however, generates a 404 error:

https://movie-finder-moviedb.netlify.app/602223

https://movie-finder-moviedb.netlify.app/about

Screen Shot 2021-07-28 at 12 47 27 PM

aemann2 commented 3 years ago

Fixed in 39b4803

Test:

https://user-images.githubusercontent.com/68879246/127546585-e9a40177-cb80-4a77-8bcb-60af1fa286ba.mov

See this blog post for more info:

https://blog.karenying.com/posts/404-react-page-not-found

Fix: add a _redirects file to the /public folder with this line:

/* /index.html 200