diff --git a/404.md b/404.md index bed3f06ec1..38e738e198 100644 --- a/404.md +++ b/404.md @@ -10,12 +10,14 @@ $( document ).ready(function() { var doRedirect=false; var forwardingURL=window.location.href; for (i=0;i -1) { + if (forwardingURL.indexOf(oldURLs[i]) > -1) { doRedirect=true; forwardingURL=forwardingURL.replace(oldURLs[i],""); } } - if (doRedirect) window.location.replace(forwardingURL); + if (doRedirect) { + window.location.replace(forwardingURL); + }; } });