Skip to content

Commit

Permalink
und nochmals
Browse files Browse the repository at this point in the history
  • Loading branch information
mcilurzo committed Aug 29, 2024
1 parent 4292183 commit 1a17f2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .github/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions src/redirect.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
{% for page in collections.all | include("data.hideInSitemap", true) | exclude("data.external", true) %}{{ page.filePathStem | removeLastPathSegment }} https://digital.sbb.ch{{page.data.redirect}};
{% endfor %}

0 comments on commit 1a17f2f

Please sign in to comment.