"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.
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
|URL||URL is the web address to which the current page will get redirect.|
|content||Specifies the property’s value. Here |
|http-equiv||Used 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>