From 1a17f2f66d7d4db124414cbaa3b8871106f37c4e Mon Sep 17 00:00:00 2001 From: Manuel Cilurzo Date: Thu, 29 Aug 2024 19:46:09 +0200 Subject: [PATCH] und nochmals --- .github/default.conf | 6 +----- src/redirect.njk | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/default.conf b/.github/default.conf index 3eecab3f..0640a375 100644 --- a/.github/default.conf +++ b/.github/default.conf @@ -52,13 +52,9 @@ server { error_page 404 /error/index.html; location / { - try_files $uri $uri/ @redirects; - } - - location @redirects { if ($new_uri) { return 303 $new_uri; } - return 404; + try_files $uri $uri/ =404; } } \ No newline at end of file diff --git a/src/redirect.njk b/src/redirect.njk index 2d8d9b86..7b35015b 100644 --- a/src/redirect.njk +++ b/src/redirect.njk @@ -6,5 +6,5 @@ parent: root eleventyExcludeFromCollections: true permalink: /redirects.txt --- -{% for page in collections.all | include("data.hideInSitemap", true) | exclude("data.external", true) %} -{{ page.filePathStem | removeLastPathSegment }} https://digital.sbb.ch{{page.data.redirect}};{% endfor %} \ No newline at end of file +{% for page in collections.all | include("data.hideInSitemap", true) | exclude("data.external", true) %}{{ page.filePathStem | removeLastPathSegment }} https://digital.sbb.ch{{page.data.redirect}}; +{% endfor %} \ No newline at end of file