clean up redirects (#3706)

This commit is contained in:
Deborah Barnard
2025-09-26 09:57:01 +01:00
committed by GitHub
parent c256ac3266
commit a369854679
3 changed files with 925 additions and 41 deletions

View File

@@ -2,29 +2,6 @@
{% block htmltitle %}
<title>404</title>
{% endblock %}
{% block extrahead %}
<script>
// Create an object containing all your redirects
const redirects = {
// Use _redirects file to set redirects
};
(function redirect(){
const currentPath = window.location.pathname + (window.location.hash ? window.location.hash : '');
const redirectUrl = redirects[currentPath];
if (redirectUrl) {
window.location.href = `${window.location.origin}${redirectUrl}`;
return;
}
})();
</script>
{% endblock %}
{% block content %}
<h1>404 - Page not found</h1>
<h2>Go <a href="/">home</a></h2>