I am using Stencil JS and Gather Content to consume data for our site. The site is deployed in Netlify. I have implemented a custom 404 page which is getting the content from Gather Content but i am not able to override the default netlify 404 page. Locally is working fine but when i deploy i am still redirected to the default 404 page of netlify.
I have added the following code to the netlify.toml file but no luck:
from = “/*”
to = “/page-not-found”
status = 404
Can you provide a working example where the custom 404 page is tsx file with configuration example?
Looking forward to hear from you.