Question

This is in my 404.shtml file

<script> var oldUrl = window.location.href; var newUrl = oldUrl.toLowerCase; location.href = newUrl; </script>
Was it helpful?

Solution

I think var newUrl = oldUrl.toLowerCase; should be var newUrl = oldUrl.toLowerCase();, since it is a function.

OTHER TIPS

toLowerCase is a function so needs ():

<script> 
    var oldUrl = window.location.href; 
    var newUrl = oldUrl.toLowerCase(); 
    location.href = newUrl; 
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top