Skip to content

Instantly share code, notes, and snippets.

@benjiwheeler
Created April 15, 2016 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjiwheeler/d298764c7de0f2e63152e09f323764b5 to your computer and use it in GitHub Desktop.
Save benjiwheeler/d298764c7de0f2e63152e09f323764b5 to your computer and use it in GitHub Desktop.
<html>
<head>
<!-- Pleace this snippet right after opening the head tag to make it work properly -->
<!-- This code is licensed under GNU GPL v3 -->
<!-- You are allowed to freely copy, distribute and use this code, but removing author credit is strictly prohibited -->
<!-- Generated by http://insider.zone/tools/client-side-url-redirect-generator/ -->
<!-- REDIRECTING STARTS -->
<link rel="canonical" href="http://destinationsitehere.com"/>
<noscript>
<meta http-equiv="refresh" content="0;URL=http://destinationsitehere.com">
</noscript>
<!--[if lt IE 9]><script type="text/javascript">var IE_fix=true;</script><![endif]-->
<script type="text/javascript">
var url = "http://destinationsitehere.com";
if(typeof IE_fix != "undefined") // IE8 and lower fix to pass the http referer
{
document.write("redirecting..."); // Don't remove this line or appendChild() will fail because it is called before document.onload to make the redirect as fast as possible. Nobody will see this text, it is only a tech fix.
var referLink = document.createElement("a");
referLink.href = url;
document.body.appendChild(referLink);
referLink.click();
}
else { window.location.replace(url); } // All other browsers
</script>
<!-- Credit goes to http://insider.zone/ -->
<!-- REDIRECTING ENDS -->
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment