Redirect Website by using Meta Tag
0 [like_dislike_count_code_webnius]

Redirect Website by using Meta Tag

First of all , a page redirect means whenever a web page is visited at certain URL , it changes to a different URL. For example, a user visits "http://www.infoconic.com/web-1" in browser and is auto transferred to "http://www.infoconic.com/web-2" instead. This is useful if we want to redirect a page to a new path , change the URL structure of a site , remove "www." from the URL, or even redirect visitors to another website.
This blog will explain you about creating a META Tag to redirect your website. This tag will never redirect emails for your domains.

However, there may be some cases in which meta refresh tags are necessary always.
1) when we cannot use .htaccess file.
2) You want to redirect only a single page/file in a directory.

Let’s assume that we have a new website with new domain name ready for us and we want to shut down the older web and domain name and we don’t want users to visit the older web. we can’t stop users by visiting the older web because user may have the older domain URL but we can redirect the older URL to new URL.
Redirection can be easily done by both client side and server side languages. Like we can also use client side redirection method such as jquery , javascript etc. And we can also use server side redirection methods such as PHP etc. Here we will discuss about redirection by meta tag.

Indeed , the simplest way to redirect to another URL is with the Meta tag. We can place this meta tag inside the <head> section at the top of any HTML page like this:
<meta http-equiv="refresh" content="100;URL='http://www.example.com'" />

Definition and Usage

AttributeDescription
URLURL is the web address to which the current page will get redirect.
contentSpecifies the property’s value. Here content attribute indicate time in seconds to wait for redirect
http-equivUsed for http response message headers. For example http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.
Example Code:
</DOCTYPE html> 
<html lang="en">    
  <head>      
    <title>Webnius Infotech</title>      
    <meta http-equiv="refresh" content="100;URL='www.infoconic.com/web-2'" />    
  </head>    
  <body> 
    <p>This page has moved to <a href="http://www.infoconic.com/web-2"> www.infoconic.com/web-2</a></p> 
  </body>  
</html>

Something To Say ?

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

*