Skip to content

Commit

Permalink
ich probiers nochmal...
Browse files Browse the repository at this point in the history
  • Loading branch information
mcilurzo committed Aug 29, 2024
1 parent 1a17f2f commit 1a72b0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ server {
return 301 $scheme://digital.sbb.ch$request_uri;
}

if ($new_uri) {
rewrite ^ $new_uri permanent;
}

rewrite ^([^.]*[^/])$ $1/ permanent;
port_in_redirect off;
autoindex off;
error_page 404 /error/index.html;

location / {
if ($new_uri) {
return 303 $new_uri;
}
try_files $uri $uri/ =404;
}
}
2 changes: 1 addition & 1 deletion 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}};
{% for page in collections.all | include("data.hideInSitemap", true) | exclude("data.external", true) %}{{ page.filePathStem | removeLastPathSegment }} {{page.data.redirect}};
{% endfor %}

0 comments on commit 1a72b0e

Please sign in to comment.