Hi all,
I have an AstroJS project, ZINiN-2024, that runs on version 5.7.2.
Locally, and also in my staging environment, the custom 404 page works as expected. When I visit the /404 or /non-existent-page, it shows the custom 404 page. But when it is on the production environment, I see the default browser 404 page (See image).
When directly visiting the /404.html however, I do get to see my custom 404 page again. I have created my 404 page in src/pages/404.astro.
When checking the network tab, I get the following errors when visiting a page that does not exists (See images).
From what I have analyzed, it seems that on any fly environment the custom 404 page does not seem to want to render. I have tested it on both the test environment of ZINiN and the live environment.
Could this be a case where I need to configure Fly in a specific way in order for me to make the /404 work? What could be causing this?
I have also tried to use Astro’s redirect and rewrite functions in order for me to go to /404, but that does not seem to do anything.
Thank you in advance!