DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Automatically Redirect To An URL

06.14.2005
| 9206 views |
  • submit to reddit
        
<html>
<head>
       <META HTTP-EQUIV="Refresh" CONTENT="5; URL=http://www.google.com">
</head>
<body>
This page is redirecting your browser to Google<br>
Please, click <a href="http://www.google.com">here</a> if redirection doesn't work.
</body>
</html>
    

Comments

Snippets Manager replied on Mon, 2012/05/07 - 2:12pm

I know too mod_rewrite. Thanks for your comment.

Snippets Manager replied on Mon, 2012/05/07 - 2:12pm

It's not recommended to use meta-tags for redirecting. http://www.w3.org/TR/WCAG10-CORE-TECHS/#auto-page-refresh It's better to use mod_rewrite for redirecting. Some information: http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html http://corz.org/serv/tricks/htaccess2.php http://www.tedpavlic.com/post_apache_rewriting_examples.php?PRINTME http://httpd.apache.org/docs-2.0/misc/rewriteguide.html http://httpd.apache.org/docs/mod/mod_rewrite.html