Forum Moderators: open

Message Too Old, No Replies

Frame Buster needed - not the commonly used one

         

fishfinger

9:46 am on Jan 20, 2006 (gmt 0)

10+ Year Member



One of my clients' (who I run a site for) business partner bought a 2nd domain for their business. The company who registered it are using cloaking and then framing MY site on theirs.

I know the

if (window!= top) top.location.href = location.href;

code will force my site to be re-loaded but that isn't a solution.

Is there a bit of code that will just stop them framing my page, so that people clicking the results in Google will get a blank page (as their site is completely empty)?

larryhatch

10:07 am on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look up .htaccess Its not a snippet of code you put on your pages,
its a file you upload to your host ISP right next to your index.html file.

Ban the offending site from calling ANY of your files. No pages, no images, nada.

They won't be blank, 403 forbidden messages maybe, but that might be even better.

Its tricky, great care is needed, but .htaccess works wonders. -Larry

Bernard Marx

11:36 am on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



.htaccess works wonders

Not if you're running IIS!

;)

larryhatch

11:46 am on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Bernard: Fishfinger didn't say what OS his servers were running.

Microsoft claims their OS has similar capabilities to .htaccess, I can't verify that.
Personally, I won't use a host if they won't or can't impliment .htaccess. -Larry

kaled

11:50 am on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this...

if (top.location.host.indexof('scumbag.com') >= 0) top.location.replace(self.location.href);

or, for added drama

if (top.location.host.indexof('scumbag.com') >= 0) top.location.replace('\scumbag.html');

Kaled.

fishfinger

12:04 pm on Jan 20, 2006 (gmt 0)

10+ Year Member



thanks for the suggestions guys.

Kaled - I tried the code but i get a javascript 'Permission Denied' error in IE and no effect in Firefox.

I think we will look into the htaccess side of things - we use linux hosting

thanks again

kaled

2:31 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Typo on my part ... indexOf (with capital).
If that doesn't work, replacing host with href should work.

Kaled.

fishfinger

5:17 pm on Jan 20, 2006 (gmt 0)

10+ Year Member



Hi Kaled - I ended up using

<!-- InstanceEndEditable -->
<script language="JavaScript">
<!-- Begin code
if (window!= top) top.location.href = 'disclaimer.htm';
// End code -->
</script>

it means that their site is now framing a page explaining that they are attempting to pass my content off as theirs with a link to my home page

thanks for your help - I posted in a few forums and this is one of only 2 where I got a quick and helpful reply.