How to specified amount of time before redirect to a new URL
Tags: Tips, URL
What is URL redirect?
Redirects allow you to make a specific web page redirect to another page and display the contents of that page. This way you can make a page with a long URL accessible by a page which has a shorter and easier to remember URL.
I know redirect from one web site to another web site is pretty simple and multiple way to do it.
For an example:
If you hosted a domain with hosting company together with cPanel, login to cPanel, click on "Redirect" and follow the instruction will do. Very simple.
The following tutorial will teach you "How to specified amount of time before redirect to a new URL" with one single line of html code. Why specified time before redirect? Probably you can use to promote certain products/web page before anyone reach your official web site and etc.
Use <META http-equiv refresh>
Description:
Indicates the document displays for a specified amount of time before switching to a new URL. The full absolute URL must be specified.
This is very useful (in fact it is recommended) when you need to move or rename a page on your site. Since search engines make have your page in their index, it is wise to include a redirect page to not lose those visitors.
Be sure and also include a link to the new page to support browsers which do not support this tag.
Both Internet Explorer and Netscape support this feature.
Attributes:
| <meta http-equiv="Refresh" content="n;url"> | |
| n is the number of seconds to wait before loading the specified URL.
url is an absolute URL to be loaded. |
|
Examples:
Edit index.html and insert a single line as below
<META HTTP-EQUIV="refresh" content="1;URL=http://www.planetmy.com/">
save the index.html and copy to http://www.planetmy.com/newpage/ So whoever browse http://www.planetmy.com/newpage, it will load "http://www.planetmy/" after waiting for one second. Enjoy and hope this can help!
Possibly Related Posts:
- RSS Feed Submissions
- Geo Positions
- Interesting about Google Suggest
- Setup a Linux Highly Availability NFS servers
- How to find empty folders on Linux
