Automatically redirect your blog or website to a new / different location in 5 minutes 
I had to move my entire old blog - Trio Concept to a new location @ blog.jerryong.com (ie. move it to a different location). So how do I redirect people from my old site automatically to my new website ?
(Note: if your server supports either Frontpage-extensions or a .htaccess file, then consider using these options, most webserver blogserver supported)
see example @ http://trioconcept.blogspot.com , it auto redirect back here in 8 seconds.
Copy and Paste the following JavaScript to you blog template or html:
<script>
<!–
function autoChange()
{
var timeID = setTimeout("location.href= ‘http://www.newlocation.com‘", 1)
}
//–>
</script>
- Replace new location address that you wish to redirect @ http://www.newlocation.com
- If set the value @ 1, this little script will wait 1 millisecond and then jumps to http://www.newlocation.com.
The delay time (indicated in bold) can be altered to for example 1000 milliseconds (1 second).
Important : Just copying this code will not do the job ! We need to trigger this procedure. This is done by adding "autochange()" to the OnLoad-event of your HTML file.
Add this event to the <BODY> tag as shown below:
<body onLoad="autoChange()">
In this example I set the OnLoad-event to execute the script we just have seen.
A full page HTML file would be similar to this one:
<HTML>
<script>
<!–
function autoChange()
{
var timeID = setTimeout("location.href= ‘http://www.newlocation.com’", 1000)
}
//–>
</script>
<BODY onLoad="autoChange()">
Welcome to my website,… unfortunally we moved it to WWW.NEWLOCATION.COM.<BR>
Your will be auto redirecting in 1 second.<BR>
If it doesn’t then please click <A HREF="http://www.newlocation.com">here</A> to visit my new blog.
</BODY>
</HTML>
This page will display a warning that the website moved and that the browser will redirecting automatically in 1 second.
Just for those browsers that do not support JavaScript (most browser support), we add an additional link including the link to the new site so they can click there.
Note: naturally, this HTML file should be placed on the OLD blog or website template
Related posts:
- HOW TO: iPhone-ize Your Website / Make Your Website iPhone Friendly
- Let Google Translate Your Blog / Website Automatically
- How to create Mobile or WAP site for your blog and website!
- Christmas Snow Effect For Your Blog / Website
- How to Converting / Export blog post from Blogger to Movable Type
- Make money from your Website or Blog - get paid for every click!
- How to Backup / Export Blogger
- Video of Nissan Fairlady 350z (Auto) Drift @ GoKart Day
Ping this!















« « 


















How to create Mobile or WAP site for your blog and website!
soup of the day : “Anyone want to join me for Malaysia F1 @ Sepang, i have extra Free tickets”This is a simple 5 minutes tutorial about How you can Create a Mobile friendly site or in technical jargon -…
[...] and insert the above generated code between your <head> </head> , alternatively you can create a redirect code & redirecting your subdomain to your newly create iPhoneize RSS [...]