Skip to content

Instantly share code, notes, and snippets.

@rickyhaswifi
Last active August 10, 2023 00:48
Show Gist options
  • Star 33 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save rickyhaswifi/1d3a208362f8f25de9c9f84b6a1ceea6 to your computer and use it in GitHub Desktop.
Save rickyhaswifi/1d3a208362f8f25de9c9f84b6a1ceea6 to your computer and use it in GitHub Desktop.
React Router Netlify - Fix for not found page
#https://stackoverflow.com/questions/58065603/netlify-renders-404-on-page-refresh-using-react-and-react-router
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
@hosniyahyaoui
Copy link

how fix this problem with angular ????

@daviddortiz
Copy link

You beautiful person, thank you.

@deanilvincent
Copy link

Works on Angular too! Make sure to include the netlify.toml on the build asset so it will be part of the deployment files.

angular.json

"assets": [
    "src/favicon.ico",
    "src/assets",
    "src/netlify.toml"
],

@anhtungbui
Copy link

Thanks a lot! I tried with the _redirects method but didnt work, only yours work like a charm. Have a nice day

@knirb
Copy link

knirb commented Feb 25, 2021

Lifesaver!

@zeel-codder
Copy link

thanks

@imshahrukh
Copy link

I love u rickyhaswifi

@Akashmane21
Copy link

thank you so much bro..

@rashidjama
Copy link

Thank you so much man. You are a life saver

@pjguitar15
Copy link

Why do we need to configure and and is not in default?

@Stabarak
Copy link

Stabarak commented May 9, 2021

Great. Thank You

@JohnGoodman
Copy link

Worked great, thanks so much

@jeffamady
Copy link

Thanks 👍

@omarr45
Copy link

omarr45 commented Jun 2, 2021

Thanks ♥

@PAXANDDOS
Copy link

I was looking for it! Thanks!

@vardhan1122
Copy link

Thanks a lot Mr.,
Thanks.

@moloypal2021
Copy link

Thanks

@Fola-rin
Copy link

Fola-rin commented Jul 6, 2021

Thanks ✌️

@brunoblaise
Copy link

Thanks

@ChenzierKabrabam
Copy link

Thank you very much!

@oleksandr-danylchenko
Copy link

Thanks! It really helped!

@Aminigbo
Copy link

Had a serious issue with my client because of this.. Thanks a million times

@bilal-abraham
Copy link

Thank you very much

@thegeorgenikhil
Copy link

Thank You!

@xXm4ntr4Xx
Copy link

Hello,i have tried this solution but didnt solve my problem, as i can see on the internet a lot of people solved in this way.
What else can i do?

@stephmunez
Copy link

Legend thanks!

@JessicaJohnBritto
Copy link

Thanks a ton! It worked for me. I was manually deploying the react app on netlify and upon including this file in the public folder, did wonders for me!
Indeed, thanks a lot!

@robertocarlosmedina
Copy link

Thanks for this solution, it really helped me.

@hqz3
Copy link

hqz3 commented Jan 24, 2023

Thank you!

@HarrisSte
Copy link

This is excellent, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment