• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

Page Redirect with HTML

Hi Experts,

Can someone please remind me how to do a page redirect in HTML?  I believe it was under <head>.

Thank you.
APD Toronto
APD Toronto
2 Solutions
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
I use something like:

<script language="javascript" type="text/javascript">
  window.location = "http://www.filecats.co.uk/sitemap/";

Open in new window

Joseph UndisNetwork and Systems AdministratorCommented:
I use the same kind of thing as Phillip has, however there's some additional text to make sure if the redirect fails for any reason it includes a link to the page.

<html lang="en-US">
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1;url=http://google.com">
        <script type="text/javascript">
            window.location.href = "http://google.com"
        <title>Page Redirection</title>
        <!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
        If you are not redirected automatically, follow the <a href='http://google.com'>link here</a>.

Open in new window

APD TorontoAuthor Commented:
Why not just  <meta http-equiv="refresh" content="1;url=http://google.com">
APD TorontoAuthor Commented:
Can anyone foresee any issues with only just that line.
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
nothing wrong with the meta refresh tag, I've used it a lot in the past. Are you looking to do a permanent redirect? If so you may want to consider using a server side language so that you can add a status code (permanent recirect) to it, making it easier for spiders to index.

For more info - http://www.somacon.com/p145.php

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now