Reputation: 1428
First of all, I would like to create a page that takes the URL parameter (e.g. /test/hell, which test
is the page and hell
is the parameter).
Therefore I created a page that takes the parameter and shows it on the title (example, with the added page link at the bottom), based on the Gatsby getting started project. It seems working.
But when I open the full URL on the browser (link), it first pops up the 404 pages and then flashback to the correct content (please refresh the page to see the 404 pages). The 404 page is not what I expected so I am not sure if how to get this fixed. Also, this problem is not being observed when I run Netlify/Gatsby locally. Here is the 404 page during webpage refresh:
This is the added code and this is the only commit that I made. I am not sure how to get rid of the 404 pages being displayed.
Thanks for the help.
Upvotes: 3
Views: 759
Reputation: 11
I solved the problem by adding a trailing slash to my link URL: From: Link to="/contact" To: Link to="/contact/"
Upvotes: 1
Reputation: 1428
I believe the problem could be solved by setting up the _redirects
file, required by Netlify, and the plugin gatsby-plugin-netlify setup the _redirects
file during build time.
Upvotes: 3