Welcome to the Info TEST server!

Skip to content. | Skip to navigation

Sections

--Redirects

HTTP, HTML, Code, Coding, Markup

See also: CGI Screens to Hide Contact Info, Preventing Directory Browsing, Restricting Access, Server Side Includes, Make a Web Form, Web Authoring, Web Use and Development, NRAO Brand, NRAO Web Publication Policy, NRAO Web Design Standards

A redirect is a way of using the underlying protocol of the web (HTTP) to cause one page to automatically move people to another. There are two ways of doing this:

  1. Modifying the web server configuration (we only do this where necessary!)
  2. Using a <meta...> tag in your HTML markup as shown below.

For most people, the second option will work just fine. Here's how to take a page, say example.html, and make it redirect people to, say, www.example.edu/~someone/newexample.html after 5 seconds:

<html><head>
<title>Not here anymore!</title>

<meta http-equiv="refresh"
content="5;url=http://www.example.edu/~someone/newexample.html">

</head>

<body> <p>This page has moved! If your browser does not automatically
bring you to the new location within about 5 seconds, please
<a href="http://www.example.edu/~someone/newexample.html">go here</a>

</body></html>

If you are using one of the many templates with Server Side Includes, for example to get the NRAO style pages, then you can just take the <meta...> tag from the example above and put it either directly above or below the <title> tag. This meta tag must be somewhere in the "head" section of the page, not the body.