HTML Forwarding / Page Redirect - How?

Superwormy

Golden Member
Feb 7, 2001
1,637
0
0
How do you set it so that when someone goes to an HTML page, they are automatically forwarded to another page after a set number of seconds?

Thanx in advance!
 

kritikal

Member
Feb 28, 2001
45
0
0
<META HTTP-EQUIV=Refresh CONTENT="X; URL=http://yoursite.com/">

X = number of seconds to wait

URL = site to forward to

example

<META HTTP-EQUIV=Refresh CONTENT="10; URL=http://idvanx.com/">

10 second wait OR

<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://idvanx.com/">

will forward immediately
 

DocDoo

Golden Member
Oct 15, 2000
1,188
0
0
META redirect is very common and works for all HTML page code. If you currecntly have a CGI page, you will need this CGI redirect instead.

#!/usr/bin/perl

print "Location: http://newdomain.com/newfile.pl\n\n";


Copy the above two lines into your text editor, replace the destination URL of your choice, and save it as the file name of the old CGI document (ie: "oldfile.pl"). Also, make sure the first line of the script, #!/usr/bin/perl, is the correct path to the Perl interpreter on your server. In some cases, it is #!/usr/local/bin/perl instead. Some servers may require #!/usr/bin/perl -w