iframe redirect to another website?

King.

New member
Dec 26, 2010
613
6
0
ok so someone's taken one of my websites and done an identical copy. Instead of just changing the hotlinked images to something obscene like most people do, I want to have his page redirected to my own.

I think I can do this as I used an iframe on the page and they haven't taken it out:

<iframe src="hxxp://website.com/123.php" width="330" frameborder="0" height="200" scrolling="0"></iframe>

At the moment I changed the url in the iframe from originally showing an image to a meta refresh. However the problem is the refresh happens inside the iframe, whereas I want it to redirect the actual page the iframe is on.

Is there anyway to have the iframe load a url which redirects the parent page to my website?

So far the only method I've found is a redirect which only works if the parent page is on the same domain as the iframe.
 


This should work.

Code:
<script type="text/javascript">
    if (top.location != location) {
        top.location.href = 'http://yoururl.com';
    }
</script>