Skip to content

Instantly share code, notes, and snippets.

@rickyhaswifi
Last active August 10, 2023 00:48
Show Gist options
  • Select an option

  • Save rickyhaswifi/1d3a208362f8f25de9c9f84b6a1ceea6 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

how fix this problem with angular ????

@daviddortiz
Copy link
Copy Markdown

You beautiful person, thank you.

@deanilvincent
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

knirb commented Feb 25, 2021

Lifesaver!

@zeel-codder
Copy link
Copy Markdown

thanks

@imshahrukh
Copy link
Copy Markdown

I love u rickyhaswifi

@Akashmane21
Copy link
Copy Markdown

thank you so much bro..

@rashidjama
Copy link
Copy Markdown

Thank you so much man. You are a life saver

@pjguitar15
Copy link
Copy Markdown

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

@Stabarak
Copy link
Copy Markdown

Stabarak commented May 9, 2021

Great. Thank You

@JohnGoodman
Copy link
Copy Markdown

Worked great, thanks so much

@jeffamady
Copy link
Copy Markdown

Thanks 👍

@omarr45
Copy link
Copy Markdown

omarr45 commented Jun 2, 2021

Thanks ♥

@PAXANDDOS
Copy link
Copy Markdown

I was looking for it! Thanks!

@vardhan1122
Copy link
Copy Markdown

Thanks a lot Mr.,
Thanks.

@moloypal2021
Copy link
Copy Markdown

Thanks

@Fola-rin
Copy link
Copy Markdown

Fola-rin commented Jul 6, 2021

Thanks ✌️

@brunoblaise
Copy link
Copy Markdown

Thanks

@ChenzierKabrabam
Copy link
Copy Markdown

Thank you very much!

@oleksandr-danylchenko
Copy link
Copy Markdown

Thanks! It really helped!

@Aminigbo
Copy link
Copy Markdown

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

@bilal-abraham
Copy link
Copy Markdown

Thank you very much

@thegeorgenikhil
Copy link
Copy Markdown

Thank You!

@xXm4ntr4Xx
Copy link
Copy Markdown

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
Copy Markdown

Legend thanks!

@JessicaJohnBritto
Copy link
Copy Markdown

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
Copy Markdown

Thanks for this solution, it really helped me.

@hqz3
Copy link
Copy Markdown

hqz3 commented Jan 24, 2023

Thank you!

@HarrisSte
Copy link
Copy Markdown

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