Skip to content

Commit dc8ac3c

Browse files
404 fix for Safari
1 parent aab444d commit dc8ac3c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

404.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ permalink: /404.html
55
---
66

77
<script language="JavaScript">
8-
function doFwd() {
98
var forwardingURL=window.location.pathname;
109
if (forwardingURL.charAt(forwardingURL.length - 1) != "/") forwardingURL += "/";
1110
var gonnaFwd = false;
@@ -53,11 +52,11 @@ function doFwd() {
5352
if (gonnaFwd) {
5453
console.log("Forwarding to: " + newURL);
5554
window.location.replace(newURL);
55+
window.location.href = newURL;
5656
document.write('<meta http-equiv="refresh" content="0; url=' + newURL + '">')
5757
} else {
5858
window.location.replace("/sorry/#" + forwardingURL);
59+
window.location.href = "/sorry/#" + forwardingURL;
5960
document.write('<meta http-equiv="refresh" content="0; url=/sorry/#' + forwardingURL + '">')
6061
}
61-
}
62-
window.onload = doFwd;
6362
</script>

0 commit comments

Comments
 (0)