One-page website for React , routing from browser via React-router .

If you go to the example on the page /user/1/post/123 and restart the browser, then throws it onto the standard githabavu stub "404 There isn't a GitHub Pages site here." as the requested resource is not on the site.

You can create your 404.html file in the project root and in the absence of the requested resource will redirect to your stub.

Question. How to set up Jekyll (config? Plugins?) On GitHub Pages so that when requesting an existing resource, it returns the requested resource, in the absence of the requested resource, it redirects not to 404.html , but to index.html .

  • Now, the site has the simplest option: the content of the 404.html file copies the contents of index.html . But this is not an engineering approach)) - Alexander Zaytsev

0