Redirect a webpage

sswingle

Diamond Member
Mar 2, 2000
7,183
45
91
I changed hosts for my webpage, and I would like to put a redirect on the old site to send people over to the new one. Can someone give me some html code to make this work?

Thanks!
 

Kappo

Platinum Member
Aug 18, 2000
2,381
0
0
<html>
<head>
<title>This page has moved -- your browser will be redirected in 5 seconds</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function redirect () { setTimeout("go_now()",5000); }
function go_now () { window.location.href =http://youpagegoeshere.html; }
//-->
</SCRIPT>
</head>
 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
<meta http-equiv="refresh" content="0,http://www.google.com/">
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
good way:
<html>
<head>
<title>This page has moved -- your browser will be redirected in 5 seconds</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function redirect () { setTimeout("go_now()",5000); }
function go_now () { window.location.href =http://youpagegoeshere.html; }
//-->
</SCRIPT>
</head>

better way:
<meta http-equiv="refresh" content="0,http://www.google.com/">
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: Need4Speed
good way:
<html>
<head>
<title>This page has moved -- your browser will be redirected in 5 seconds</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function redirect () { setTimeout("go_now()",5000); }
function go_now () { window.location.href =http://youpagegoeshere.html; }
//-->
</SCRIPT>
</head>

better way:
<meta http-equiv="refresh" content="0,http://www.google.com/">

Best way:
301 Document Moved Permanently
(note that this requires configuring your server, or playing with .htaccess or something)
 

sswingle

Diamond Member
Mar 2, 2000
7,183
45
91
Could someone please explain what this: <meta http-equiv="refresh" content="0,http://www.google.com/"> does for me? And do I need to change it in any way, or just put it in like that?

I want something to load, and for their to be a redirect, because I still have business cards, previous customers, etc, that know about the old site, but not the new one.