Frage

This is in my 404.shtml file

<script> var oldUrl = window.location.href; var newUrl = oldUrl.toLowerCase; location.href = newUrl; </script>
War es hilfreich?

Lösung

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

Andere Tipps

toLowerCase is a function so needs ():

<script> 
    var oldUrl = window.location.href; 
    var newUrl = oldUrl.toLowerCase(); 
    location.href = newUrl; 
</script>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top