Github Pages doesn't really understand how SPA works and will redirect any route outside of index.html to 404.html.
This is a hack that allows us to preserve the URL, redirect to index.html and load the correct route in JavaScript.
Example:
In the app, it uses JavaScript to change the URL to meme.place/c/bitconnect
If the user reloads the page, GitHub tries to find a file at meme.place/c/bitconnect and can't, so it loads up 404.html. This PR will overwrite the 404 file and preserve the URL while redirecting to index so it can figure out what to load.
Github Pages doesn't really understand how SPA works and will redirect any route outside of
index.html
to404.html
.This is a hack that allows us to preserve the URL, redirect to index.html and load the correct route in JavaScript.
Example:
In the app, it uses JavaScript to change the URL to meme.place/c/bitconnect
If the user reloads the page, GitHub tries to find a file at meme.place/c/bitconnect and can't, so it loads up 404.html. This PR will overwrite the 404 file and preserve the URL while redirecting to index so it can figure out what to load.