//Execute it here, right in the script
redirectToPlatform(location.href)

function redirectToPlatform(url) {
    // if/else tests avoids an infinite loop if there is no dtt in the URL
    if(url.match("/dtt/home/")) {
	window.location=url.replace(/\/dtt\/home\/.*/, "/au")
    } else if(url.match("/dtt/")) {
        window.location=url.replace("/dtt/", "/legacy/");
    }
}