404 fix for Safari

This commit is contained in:
John Mulhausen
2016-10-07 13:11:38 -07:00
parent aab444d99b
commit dc8ac3cc4e

5
404.md
View File

@@ -5,7 +5,6 @@ permalink: /404.html
---
<script language="JavaScript">
function doFwd() {
var forwardingURL=window.location.pathname;
if (forwardingURL.charAt(forwardingURL.length - 1) != "/") forwardingURL += "/";
var gonnaFwd = false;
@@ -53,11 +52,11 @@ function doFwd() {
if (gonnaFwd) {
console.log("Forwarding to: " + newURL);
window.location.replace(newURL);
window.location.href = newURL;
document.write('<meta http-equiv="refresh" content="0; url=' + newURL + '">')
} else {
window.location.replace("/sorry/#" + forwardingURL);
window.location.href = "/sorry/#" + forwardingURL;
document.write('<meta http-equiv="refresh" content="0; url=/sorry/#' + forwardingURL + '">')
}
}
window.onload = doFwd;
</script>