Hotlinking my entire page? How to stop it?

Soldato
Joined
26 Aug 2006
Posts
9,726
Location
62.156684,-49.781113
I realised this morning that someone with the same name and owner of http://barrons.me.uk had an exact copy of my holding page at http://jamiebarron.co.uk...

Why, I know not. Seeing as the link still directs to my blog! Wondered how the image was appearing as I don't allow hotlinking, but it seems he's just inserting the entire page as a link into his?

Code:
<p><a href="http://www.jamiebarron.co.uk/">http://barrons.me.uk/</a></p>

Therefore changing the image to something better I had lined up doesn't work. Not that the bandwidth or anything bothers me, more out of personal amusement, how can I get around this? :)
 
He's running your site in a frame from his site. I don't think there's anything you can do if it doesn't send a referring URL, whatever you change or do will reflect on your site too.
 
If your site is being loaded in a frame, I have a feeling there's some javascript which can reload the page and remove the frame. I think.
 
If your site is being loaded in a frame, I have a feeling there's some javascript which can reload the page and remove the frame. I think.

Or replace it with something funny?

I had one all ready:

bar.jpg
 
Is it easy enough to check the URL?

sure is :)

this code should do it, just need to replace the top 3 variables to whatever you want them as. I have made it so you put the correct code for your site in a separate file and the code for the other site in another file.

PHP:
<?php

$whatUurlShouldBe = "http://www.jamiebarron.co.uk";
$correctURLFile = "goodFile.html";
$incorrectURLFile = "badFile.html";

function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}




if (curPageURL() == $whatUurlShouldBe) {

include($correctURLFile);

}

else {
include($incorrectURLFile);
}

?>
post back if it worked.
 
I'm pretty sure checking the url server side won't work work because it's being loaded within the frame - the url will be jamiebarron.co.uk
 
If your site is being loaded in a frame, I have a feeling there's some javascript which can reload the page and remove the frame. I think.

^ This is all you can do, break out of the frame. But that won't really do much.
http://www.thesitewizard.com/archive/framebreak.shtml Looking at that, it's probably possible with javascript that you can redirect him to another page.
Code:
function breakout_of_frame()
{
  // see http://www.thesitewizard.com/archive/framebreak.shtml
  // for an explanation of this script and how to use it on your
  // own website
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}
Just modify that to redirect to your cute image.
 
I'm not so bothered about having him remove it, just want to have fun and see how long until he notices!
 
Code:
function breakout_of_frame()
{
  // see http://www.thesitewizard.com/archive/framebreak.shtml
  // for an explanation of this script and how to use it on your
  // own website
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}
Just modify that to redirect to your cute image.

Looking at having a bash at this, but it would change the whole page rather than just the image. I'm not familiar with JS, could I get it just to load a different .php file from my site?
 
sure is :)

this code should do it, just need to replace the top 3 variables to whatever you want them as. I have made it so you put the correct code for your site in a separate file and the code for the other site in another file.

PHP:
<?php

$whatUurlShouldBe = "http://www.jamiebarron.co.uk";
$correctURLFile = "goodFile.html";
$incorrectURLFile = "badFile.html";

function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}




if (curPageURL() == $whatUurlShouldBe) {

include($correctURLFile);

}

else {
include($incorrectURLFile);
}

?>
post back if it worked.

Won't work because the page is loaded under a separate request and hence the server is not aware of the fact that the page is being loaded in a frame.
 
Looking at having a bash at this, but it would change the whole page rather than just the image.

as it stands that js will simply break your site out of the frame and show your url in the address bar. you could use it load alternative content but what's the point?
 
I'm a little confused as to why anyone would do this anyway. There's no chance that you actually own the barrons.me.uk address and completely forgot about it? The frame page looks like the sort of thing a registrar puts round a site when you don't want to bother with setting up nameservers. Could be that he wants to use it as an email address and just put in anything as the forwarding page.
 
Here's a thought. He has had the domain since 2004, you have had yours since 2008. Perhaps he used to own your domain, and forwarded his other one to there. Then he let one expire but never updated the forwarding page.
 
Here's a thought. He has had the domain since 2004, you have had yours since 2008. Perhaps he used to own your domain, and forwarded his other one to there. Then he let one expire but never updated the forwarding page.

Nope, was dead not so long ago :)
 
Back
Top Bottom