From b0d71ad187afbe67248bb675e6bbec7c7abfc2ee Mon Sep 17 00:00:00 2001 From: Arnaud Ligny Date: Mon, 23 Oct 2023 18:58:25 +0200 Subject: [PATCH] fix: force 404 redirects --- layouts/page.netlify_redirects.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/page.netlify_redirects.twig b/layouts/page.netlify_redirects.twig index 137a4c3..21a9f76 100644 --- a/layouts/page.netlify_redirects.twig +++ b/layouts/page.netlify_redirects.twig @@ -15,9 +15,9 @@ {%- endfor -%} {%- endif ~%} # Custom 404 error pages -{{ url(site.home, {'canonical': false}) }}* {{ url(site.page('404'), {'language': site.language, 'canonical': false}) }} 404 +{{ url(site.home, {'canonical': false}) }}* {{ url(site.page('404'), {'language': site.language, 'canonical': false}) }} 404! {%- if site.languages > 1 -%} {%- for language in site.languages|filter(l => l.code != site.language) ~%} -/{{ language.code }}/* {{ url(site.page('404', language.code), {'canonical': false}) }} 404 +/{{ language.code }}/* {{ url(site.page('404', language.code), {'canonical': false}) }} 404! {%- endfor -%} {%- endif ~%} \ No newline at end of file