Skip to content

Commit

Permalink
fix: force 404 redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Oct 23, 2023
1 parent 6a98131 commit b0d71ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/page.netlify_redirects.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 ~%}

0 comments on commit b0d71ad

Please sign in to comment.