in my BrowserRouter Switch with my own 404 page, instead of putting the homepage there.
Also you should consider passing the exact prop to your other paths so that /blog/invalidpath does not silently redirect to /blog. The 404 route shouldn't have the exact prop though.
I write to better educate myself as I go through CTFs and Bug Bounties. If anything I have written is incorrect, please let me know and send me a link to an article to read to better educate myself.
Location
Seattle
Education
Information Technology BA and Software Engineering Bootcamp Grad
Thanks for the input. I have since changed it to a HashRouter for the GitHub Pages to get my refreshing to work and then the Switch with a 404 default pages works great. GitHub Pages is so picky.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
About getting a 404 page running, I use
in my BrowserRouter Switch with my own 404 page, instead of putting the homepage there.
Also you should consider passing the
exact
prop to your other paths so that/blog/invalidpath
does not silently redirect to/blog
. The 404 route shouldn't have theexact
prop though.Thanks for the input. I have since changed it to a HashRouter for the GitHub Pages to get my refreshing to work and then the Switch with a 404 default pages works great. GitHub Pages is so picky.