Solved

How to redirect to another URL

Posted on 1998-02-05
6
274 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 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