Перейти к главному содержимому

HTML redirect

Перенаправить статически страницу можно html-тегом <meta... внутри <head>...</head>, можно при помощи javascript. Лучше использовать и то и другое. И на всякий случай ещё и явную ссылку, вдруг у кого-то браузер сам не перейдёт.

Вот пример:

<!DOCTYPE HTML>
<html lang="en-US">
<head>
  <meta charset="UTF-8">
  <!-- html redirect with timeout=0 -->
  <meta http-equiv="refresh" content="0; url=http://example.com">
  <!-- for search engines -->
  <link rel="canonical" href="http://www.example.com"/>
  <!-- javascript redirect -->
  <script type="text/javascript">
      window.location.href = "http://example.com";
  </script>
  <title>Page Redirection</title>
</head>
<body>
  <!-- Note: don't tell people to `click` the link, 
       just tell them that it is a link. -->
  If you are not redirected automatically, 
  follow this <a href='http://example.com'>link to example</a>.
</body>
</html>