This is in my 404.shtml file
<script> var oldUrl = window.location.href; var newUrl = oldUrl.toLowerCase; location.href = newUrl; </script>
I think var newUrl = oldUrl.toLowerCase;
should be var newUrl = oldUrl.toLowerCase();
, since it is a function.