Solved

How to redirect to another URL

Posted on 1998-02-05
6
281 Views
Last Modified: 2013-12-25
I've seen web sites that show a page for a few seconds, then automatically redirect to another URL. How do they do this? The only way I am able to put a redirect statement is before the <html> statement, which immediately redirects, without being able to show the page that is doing the redirection for a few seconds, as I want to.
0
Comment
Question by:chekhov
  • 3
  • 2
6 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1831951
You do it like this (example in PERL)

#!/usr/bin/perl

print "Location: www.moved.com\n\n"


The actual temporary display is performed by the browser and is handled differently by different brands.  The Location response, it what triggers that to happen.
0
 
LVL 1

Expert Comment

by:bass5763
ID: 1831952
You can do it in HTML with the command:
<META HTTP-EQUIV="Refresh" CONTENT="60; url=page.htm">

make sure you put it in between<HEAD> </HEAD>
the 60 is the amount of seconds you want it to wait before moving on. the URL is the page to goto.

Thanks,
Matt Calhoun
0
 

Author Comment

by:chekhov
ID: 1831953
bass5763: you gave me the correct answer, but I can't assign it to you because you entered it as a comment, not as an answer. Please reenter it as an answer.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 1

Expert Comment

by:bass5763
ID: 1831954
First, you have to re-open the question in order for me to answer it.

Thanks,
Matt Calhoun
0
 

Author Comment

by:chekhov
ID: 1831955
bass5763: it's reopened now
0
 
LVL 1

Accepted Solution

by:
bass5763 earned 100 total points
ID: 1831956
You can do it in HTML with the command:
<META HTTP-EQUIV="Refresh" CONTENT="60; url=page.htm">

make sure you put it in between<HEAD> </HEAD>
the 60 is the amount of seconds you want it to wait before moving on. the URL is the page to goto.

Thanks,
Matt Calhoun
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question