diff --git a/staticwebapp.config.json b/staticwebapp.config.json index 4bebfd7..06c0bf2 100644 --- a/staticwebapp.config.json +++ b/staticwebapp.config.json @@ -1,6 +1,6 @@ { "navigationFallback": { - "rewrite": "/index.html", + "rewrite": "/404.html", "exclude": [ "/images/*.{png,jpg,gif,ico}", "/*.{css,scss,js,png,jpg,gif,ico,svg}" @@ -11,10 +11,21 @@ "route": "/ebd/*", "serve": "/index.html", "statusCode": 200 + }, + { + "route": "/*", + "serve": "/404.html", + "statusCode": 404 } ], "mimeTypes": { ".json": "text/json", ".svg": "image/svg+xml" + }, + "responseOverrides": { + "404": { + "rewrite": "/404.html", + "statusCode": 404 + } } } diff --git a/svelte.config.js b/svelte.config.js index ac440bb..9ac95d5 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -8,7 +8,7 @@ const config = { adapter: adapter({ pages: "build", assets: "build", - fallback: "index.html", + fallback: "404.html", paths: { base: process.env.BASE_PATH || "", },