- choose at least one appropriate tag for your post (more is better)
- a short description & what you have tried to fix it (DNS really may take up to 48 hours to propagate.)
- build log errors, screenshots, etc
- your Netlify instance name, for example:
Did you use the search before posting?
What about reading through our https://answers.netlify.com/search?q=common%20issue?
Redirects not working as expected. I’m implementing client side routing in GatsbyJS in the same way I have done on this site https://shelleyexplorer.cardano.org/. That site is also hosted on Netlify. The only difference with the new implementation is the netlify.toml file is generated on build. The build output reads the redirect rules though as they do work, just not as expected.
# Use this file as your netlify.toml file # client side route redirects are auto # generated. [[redirects]] from = "/test/*" to = "/test/" status = 200 [[redirects]] from = "/en/test/*" to = "/en/test/" status = 200 [[redirects]] from = "/ja/test/*" to = "/ja/test/" status = 200
There are static html pages for
/ja/test.html, the redirects above are intended to serve these files without modifying the URL, for client side routing to take over once the initial files have been served. This is to ensure direct server rendered links to
/test/123/ etc. are not served with a 404 page initially from the server.
As I said before I’ve implemented the same approach on https://shelleyexplorer.cardano.org/, the only difference being the netlify.toml file is generated in this instance as opposed to a static file in the repository.
Screenshot of successful build outputting 3 redirect rules as expected - I cannot see how these have been processed.