Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   blocking an iframe loading my galleries? (http://www.greenguysboard.com/board/showthread.php?t=35805)

frankthetank 2006-11-03 02:59 PM

blocking an iframe loading my galleries?
 
oK, some nice guy is loading some of my galleries into an iframe. He replaces the links from the thumbs to the preview movies with a trojan .exe.

So I found some scripts like framebuster which should prevent this, but scripting couold hardly be used on galleries for their rules.

Any solution for this maybe using .htaccess or somehting like this?|huh

virgohippy 2006-11-03 03:21 PM

This, in your htaccess, might work:

Code:

SetEnvIfNoCase Referer ".*(baddomainname).*" BadReferrer
order deny,allow
deny from env=BadReferrer

Haven't tried it out though, as I've not had a reason to, just yet. |loony|

frankthetank 2006-11-03 03:45 PM

Quote:

Originally Posted by virgohippy (Post 310100)
This, in your htaccess, might work:

Code:

SetEnvIfNoCase Referer ".*(baddomainname).*" BadReferrer
order deny,allow
deny from env=BadReferrer

Haven't tried it out though, as I've not had a reason to, just yet. |loony|

Thank´s, but doesn´t work. he has the i-frame above the head tags:




QuickDraw 2006-11-04 01:17 AM

Nevermind.. I was going to post a javascript solution but I don't think tgps' bots would like that so.. Maybe a conditional php script.. something like if referer = x; include break out of frames header; else just display normally.

oast 2006-11-09 12:12 PM

Why not use .htaccess to ban his server's IP?
Code:


Order Deny, Allow
Deny from Leecher's.server.IP


gamester 2006-11-09 01:36 PM

or you can block his traffic using .htaccess
just add this:
Block traffic from a single referrer:

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite\.com [NC]
RewriteRule .* - [F]

Block traffic from multiple referrers

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
RewriteCond %{HTTP_REFERER} anotherbadsite\.com
RewriteRule .* - [F]


It`s working I use on my site

oast 2006-11-09 01:54 PM

Quote:

Originally Posted by gamester (Post 311277)
Block traffic from multiple referrers

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
RewriteCond %{HTTP_REFERER} anotherbadsite\.com
RewriteRule .* - [F]

The way that is written it has the one draw back in that a legitimate user from http://thisbadsite.com will be blocked too.
Code:

RewriteCond %{HTTP_REFERER} ^(www\.)?badsite\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^(www\.)?anotherbadsite\.com

Would be a way round it

virgohippy 2006-11-09 02:39 PM

Hey Frank,

Have you tried sifting through your server logs to see how the offending site is requesting your pages?

If none of the solutions mentioned here work posting a few lines of your server log may make it easier for more experience gurus to find a solution. |huh

frankthetank 2006-11-09 03:12 PM

Quote:

Originally Posted by virgohippy (Post 311297)
Hey Frank,

Have you tried sifting through your server logs to see how the offending site is requesting your pages?

If none of the solutions mentioned here work posting a few lines of your server log may make it easier for more experience gurus to find a solution. |huh

thank´s for all the kind replies. I discussed the problem with a programer and what I did get wrong was that it is not his domain or IP which pulls data from my server but the surfers IP. So it seems to be unresolved and I have to deal with it.

Here is the link to the cheating site for those who are interested in it.
(do not click the thumbs and install the .exe)

http://pleasure-porn.net/ronne/1419836110/1/?id=1114

And here is the code snippet from his site which includes my gallery link:





It´s an iframe above the head tag of his site.

Maj. Stress 2006-11-09 11:52 PM

frank,
There are a few threads at webmasterworld about this. Here is one of em. I also put in a email to a friend of mine that might know how it's done. http://www.webmasterworld.com/forum91/450.htm
Here's another:
http://www.webmasterworld.com/forum91/1131.htm


All times are GMT -4. The time now is 08:39 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc