Issue with redirect script
So this is a bit of an odd one. I have a site which has been http. We recently switched to an https for it. Our hosting service has said there's no way that they can redirect it for us (even though the domains and SSL are also through them). They directed us to insert this code into our site in order to redirect it.
<script language="javascript">
if (document.location.protocol != "https:")
{
document.location.href = "https://subdomain.yourdomain.com" + document.location.pathname;
};
</script>
The code works and the site redirects. However, when I enter the code...the page goes a bit wonky in Live View and I get one of two errors (see screen grab). The only way I can go in and make any visual changes is to switch to design mode or remove the script entirely. Any thoughts?
