// if javascript is enabled and
// the URL does NOT contain #, add it
var base = (baseUrl == '/') ? '' : baseUrl;

if(playerVersion.major <= 9)
{
    if (window.location.hash != '')
        location.replace(base + window.location.pathname.replace(base, '') + window.location.hash.substring(2) + location.search);
}
else
{
    if (window.location.hash == '')
        location.replace(base + '/#' + window.location.pathname.replace(base, '') + location.search);
}