Main » 2014 » May » 15 » HTML REDIRECT CODE
1:04 PM
HTML REDIRECT CODE
HTML REDIRECT CODE
POSTED BY http://ANONYMOUSZONE.AT.UA

 
HTTP://
Most of us think how index sites ends up with a non-index url, this is one of the reason why it happens. A redirection code is added in index file. This is just a simple HTML auto redirect code.

Here's the code : 
<meta http-equiv="refresh" content="N; URL=WEBURL">
where :
N - the number of seconds that you want the currect page to be displayed before it redirects to the main page. If N is equal to 0, it will automatically refresh and go the the redirection page.
WEBURL - put the url of the page you want it to redirect


You must put this code in a file named "index.html" without quotes and add <head></head>, the code will be like this.

<head><meta http-equiv="refresh" content="N; URL=WEBURL"></head>

You can add a <p></p> tag to appear your message and it will look like this.

 <head><meta http-equiv="refresh" content="N; URL=WEBURL"></head>
<p> Text here </p>

There is also another code :
<body onload="window.location.replace('http://urlidhere')">


That's all for this tutorial. 
Views: 171 | Added by: Anonymous-Admin | Rating: 0.0/0
Total comments: 0
Only registered users can add comments.
[ Sign Up | Login ]