How-To: Redirect to different URL using Javascript or META tags
Aug.18, 2008 in
Development, How To
If you need to redirect from one page to another, you can achieve this with either a META tag redirection or Javascript. See below for an example. You should provide a manual link as not all browsers support META tags – and javascript won’t work if its been disabled:
<html>
<head>
<title>Move my domain!</title>
<meta http-equiv="refresh" content="url=http://www.newdomain.com">
<script language="JavaScript">
function Redirect()
{
window.location = 'http://www.newdomain.com';
}
</script>
<body onLoad='Redirect()'>
</body>
</html>

Leave a Reply