I'd like to see an option to have a custom HTTP 404 page. Super simple implementation would be to publish a page to /404.html (how Hugo does it by default)
Hi @wictorwilen,
This exists today: https://docs.microsoft.com/en-us/azure/static-web-apps/routes#custom-error-pages
Take a look at the example routes.json file as it shows a custom 404
Thanks!
FYI, you need to use
"responseOverrides": {
"404": {
"rewrite": "/404.html"
}
}
as defined at https://docs.microsoft.com/en-us/azure/static-web-apps/configuration#response-overrides.
For some reason
"platformErrorOverrides": [
{
"errorType": "NotFound",
"serve": "/404.html"
}
]
doesn't work for me.
Most helpful comment
Hi @wictorwilen,
This exists today: https://docs.microsoft.com/en-us/azure/static-web-apps/routes#custom-error-pages
Take a look at the example routes.json file as it shows a custom 404