Redirecting a webpage

There is a very simple method of redirecting webpages in html. In the <head> element you simply need to add the <meta> tag <meta http-equiv="Refresh" content="0; URL="> to the contents of your html between your <head></head> tags. Lets look at the tag in more detail, http-equiv="Refresh" tells the web browser to refresh the webpage with the following variables content="0; URL=". There are two variables in content seperated by a semi-colon. The first, in this case 0, tells the browser how long to wait in seconds before reloading the webpage. The second, in this case URL=, gives the browser the url to redirect too. So for the above we have told the browser to load the page immediately. If we had set the first variable to 60 then the browser would wait 60 seconds before loading

So say you want to redirect your main website at straight to your blog then you would replace the code in your index.html file in your Website folder with the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
	<meta http-equiv="Refresh" content="0; URL=">
        <title>My Blog</title>
	<!--<p>This page should automatically redirect you to
       <a href=""></a></p>-->

You should replace the name parts of the urls with your name which is the part before the in your email address. The paragraph in the <body> has been commented out with <!-- -->. You may want to remove the comments so that the browser displays a link that people can click on if for some reason their browser fails to redirect them. You may also wish to change the title from My Blog to anything else you wish.

Leave a Reply

Your email address will not be published. Required fields are marked *