Forum Moderators: phranque
If you click on it takes you to our website with this URL showing: [theirsite.de...] and stays like that as you click through our internal links, with the content being lifted from our site as it happens, (you can see it in the logs).
I sent an email telling them to get if off, but how do I ban this stuff using Apache or prevent them from lifting my content into their URL?
The answer depends on how they are including your content. If they are simply framing your site, you could use a common JavaScript escape-from-frame script to take back 95% of your traffic (about 95% of users have JS enabled).
If they are using an iFrame, then you would need to block their server from accessing your content.
Do a view-page-source on their copy of your page, and see *how* they are displaying your page.
Jim
<HTML>
<HEAD>
<TITLE>xx</TITLE>
<script language="Javascript">
self.focus();
</script>
</HEAD>
<FRAMESET NAME=MAIN ROWS="38,*" FRAMEBORDER="no" BORDER="0">
<FRAME NAME="TOP" SRC="leiste_einfach.html?query=&search_type=&url=http%3A%2F%2Fwww.xx.org&tag=&optfam=" FRAMEBORDER="no" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no">
<FRAME NAME="CONTENT" SRC="http://www.xx.org">
</FRAMESET>
</HTML>
If I could bug you one more time, I should be reading up on, "JavaScript escape-from-frame script"? I've never done any scripting... guess it's time to learn some new skills.
<SCRIPT LANGUAGE="JavaScript">
if(top.location.href!=location.href) top.location.replace(location.href);
</SCRIPT>
Now I have to figure out the location part... my blo*dy dial-up connection is intermittent at the moment. I'm having a hard time searching info on it. That script will just go in the html of the index page, (which is where they are arriving), will it?
ADDED:
It's coming in on my own IP when I click on it, I thought of banning the IP right off the bat, but realized I couldn't. Here is the logs. The IP# showing up is my own intermittent dial-up connection.
209.x.x.x - - [11/May/2004:07:12:55 -0600] "GET / HTTP/1.1" 200 3435 "http://www.low-life-thieves.de/leiste/?url=http%3A//www.oursite.org" "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6) Gecko/20040206 Firefox/0.8"
It doesn't appear to be doing it. I put the code in the <head></head> of the index.htm... clicking on the low-life URL still shows my index with their URL, "http://www.them.de/leiste/?url=http%3A//www.oursite.org", and it clicks through to the other pages with that URL.
ADDED:
I haven't been able to find the link on their site yet... the whole thing's in German, and has many categories of links, must be hundreds or more. Maybe if I click on their original link it would work? I'm still tryin the one I got from the logs...
What I want is that when someone clicks into our index.htm from their site, and then into internal pages, that it breaks out of having their URL prefaced to ours. I can see a SE coming in on their link to us, then following it through our site, and seeing it as part of theirs, then we have dupe content problems...
Try the following variation. It is subtly different, and may work for you. Of course, you must have JS enabled in your browser to see the effect of either version.
<script language="JavaScript" type="text/JavaScript">if (parent.frames.length > 0) top.location.replace(document.location);</script>
Jim
I hadn't tried clearing the cache before, and had only tried with Firefox. Whether it's the new code, or clearing the cache, it works like a charm now. I chekced it with Firefox, Netscape 7, and IE, and it's good in all of them. It finally breaks my pages out of the ab*ut.com frames too, (they have links to 5 different pages on my site, all from one page). Wicked. I'm going to stick that code into a bunch of other pages.
This is a question for a different forum, (and I'll have to try the site search), but I wonder if G, Y, and MSN, see the javascript, and if not, if they are fooled by that bogus linking form into thinking the Directory site has all those linked pages on its own site. I'll check around elsewhere on WW.
Many thanks Jim, Gergoe, and Bird.
Does this framebraker script help against iframes as well or just against regular frames? If not, is there a way to break out of an iframe?
No, I'm not intending to hijack someones pages via iframe. I just run over a site who did just that and I want to prevent my sites from being hijacked that way.