This is in my 404.shtml file
<script> var oldUrl = window.location.href; var newUrl = oldUrl.toLowerCase; location.href = newUrl; </script>
This is in my 404.shtml file
<script> var oldUrl = window.location.href; var newUrl = oldUrl.toLowerCase; location.href = newUrl; </script>
Share
Improve this question
asked Feb 22, 2014 at 23:37
user3056010user3056010
131 silver badge3 bronze badges
2 Answers
Reset to default 3I think var newUrl = oldUrl.toLowerCase;
should be var newUrl = oldUrl.toLowerCase();
, since it is a function.
toLowerCase
is a function so needs ()
:
<script>
var oldUrl = window.location.href;
var newUrl = oldUrl.toLowerCase();
location.href = newUrl;
</script>