PrintLogo

Redirecting a Web Page With Javascript




If you need to redirect a web site, just put the following html in place of the page you want to redirect:

<head>
<script type="text/javascript">
<!--
setTimeout('Redirect()',2000);
function Redirect()
{
location.href='http://newdomain.com/';
}
//-->
</script>
<html>
<body>
This site is no longer located here.
<br />
You will be redirected in 2 seconds.  Please update your bookmarks/links
</body>
</html>





This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art420.html

Copyright 1997-2008 NetAdminTools.com. Read our Terms of Use.