Jump to content
xisto Community
Sign in to follow this  
Amezis

Redirect Code Help

Recommended Posts

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

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

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

sorry i posting i find it on internet
this kind of script for u
3 level

1- 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 script
i dont write these scripts i find it for help to u ( not copy pasting)



Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

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

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 :P

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.