Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Sunday, February 18, 2018

JavaScript rewrite URL


if (document.URL == "http://www.domainName.com/") {
console.log(document.URL);
        var restOfUrl = window.location.href.substr(11);
        window.location = "http://" + restOfUrl;
    }

Comments are welcome