Amezis 0 Report post Posted March 22, 2005 Can someone give me the code which redirects you automatically in the whole page instead of only in the frame? I'm using this code, but it just redirects inside a frame... <meta HTTP-EQUIV="REFRESH" content="0; url=http://http://www.something.com/;But now .tk has added a ad to the pages so I don't want to use it anymore, so I want that people entering the site is being redirected to the "real" domain name now... Share this post Link to post Share on other sites
serverph 0 Report post Posted March 22, 2005 i suppose you want the code to break out of frames? here it is: <script language="JavaScript"type="text/javascript"><!--function breakout_of_frame(){if (top.location !=location){top.location.href =document.location.href;}}--></script></head><body onload="breakout_of_frame()"> take note that the javascript has to be inside the head tags (so i included the closing tag for the head tag in the code). don't forget also the command within the body tag (included as well in the code to guide you). hope this helps. Share this post Link to post Share on other sites
Amezis 0 Report post Posted March 26, 2005 OK, thanks... However, .tk only had the ad on the top for an hour, then they removed it... dunno if it was only a bug... But thanks anyway, i'm running my page in frames, so thanks for the code. Share this post Link to post Share on other sites
alexia 0 Report post Posted May 2, 2005 (edited) sorry i posting i find it on internetthis kind of script for u3 level1- level/ <html><script> alert("This page has been moved to a new location... click OK to be redirected."); location = "i-code.co.uk/index.php" </script></html> 2 - level <html><script> if(confirm("This page has been moved to a new location... would you like to be redirected")) { location = "i-code.co.uk/index.php" } else { history.back(); }</script></html> 3- level <html><script> location = "i-code.co.uk/index.php" </script></html> I find it on internet by searching and posting here for just learing scripti dont write these scripts i find it for help to u ( not copy pasting) Edited December 16, 2016 by OpaQue (see edit history) Share this post Link to post Share on other sites
Amezis 0 Report post Posted May 5, 2005 Thanks, these was nice. However, dot.tk added a big ad frame for some hours, and then it was gone, but I needed that code anyway, so thanks! Share this post Link to post Share on other sites
Tyssen 0 Report post Posted May 9, 2005 You need to keep in mind that some hosts that force ads on you will suspend your account if you use frame-busting/redirection scripts. Share this post Link to post Share on other sites
Amezis 0 Report post Posted May 12, 2005 Yes, but I didn't use it for that... Thanks alot for the help anyway The code i am using now, is <script LANGUAGE="JavaScript"><!--if (parent.frames.length > 0){parent.location.href = location.href;}--> </SCRIPT>I put it in the body tags, and it works good Share this post Link to post Share on other sites
iGuest 3 Report post Posted June 24, 2008 html redirect code Redirect Code Help About Redirect to other web address // html code -- http://forums.xisto.com/no_longer_exists/ -reply by sezer Share this post Link to post Share on other sites
kevin08 0 Report post Posted July 16, 2008 html redirect code Redirect Code Help About Redirect to other web address // html code -- http://forums.xisto.com/no_longer_exists/ -reply by sezer Hi FeedBacker, This page is not opening. Well, I have a blog and I want to redirect it to my own domain. Are the above scripts useful to redirect a blog to my own domain? or Is there any other method to redirect a blog to my own domain? I will appreciate your reply. Thanks... Share this post Link to post Share on other sites