From 379b2d8d52510ae38a3b7d7ebf497f98ab5de944 Mon Sep 17 00:00:00 2001 From: Manuel Cilurzo Date: Fri, 23 Aug 2024 14:55:19 +0200 Subject: [PATCH] noch ein versuch --- .github/default.conf | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/default.conf b/.github/default.conf index 21e0ce3aa..c41de3094 100644 --- a/.github/default.conf +++ b/.github/default.conf @@ -40,13 +40,26 @@ server { port_in_redirect off; autoindex on; + location / { - add_header Cache-Control "no-cache"; - try_files $uri $uri/ /error/index.html; + error_page 404 https://digital.sbb.ch/error/index.html; + try_files $uri $uri/ =404; } + + #location / { + # add_header Cache-Control "no-cache"; + # try_files $uri $uri/ @RedirectToError; + #} + + #Catch 40x errors: + #error_page 400 401 402 403 404 = @RedirectToError; + + #Catch 50x errors: + #error_page 500 501 502 503 504 = @RedirectToError; + + #We are now redirecting to the homepage of the site + #location @RedirectToError { + # return 404 /error/; + #} - error_page 500 502 503 504 404 /error/index.html; - location = /error/index.html { - internal; - } } \ No newline at end of file