Swapping File For Hotlinking Sites

Lickalotpuss

Registered Member
Joined
May 11, 2010
Messages
84
Reaction score
8
Hey guys,

I have encountered a site that is hotlinking something from me. I was wondering how I can easily swap the file on his site to something of mine? As of right now he is stealing a swf file. With cPanel hotlink protection it stops his site no sweat but I would like to put a gif or another swf if I have to that says something like "Check out the best site on the net! Click here" and pull his traffic to my site.

Any ideas? I know that I can just rename the file on my site and name the click here file the name he is using on his site but I would like something automatic for the future as well.

Thanks for the ideas.
 
Well i mentioned one way to do it but I would like it automatic. I dont want to check whos hotlinking me and change files whenever it happens. Auto is what im looking for.
 
Put this in your .htaccess file.
Code:
# hotlinking

  RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourblog\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?your\.friends\.
site\.com/ [NC]
RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg) [NC]
RewriteRule .*\.(gif|png|jpg)$ /images/hotlink.jpg [NC]
Replace /images/hotlink.jpg with your own hotlink replacement image. And replace the URL locations, formatted as they are, with your own. You don?t have to include YOUR site, just sites you allow to use your server images on.
 
that didnt seem to work for me. Maybe because the file that was being hotlinked was a swf and I was replacing with a jpg?

Thanks
 
did you change

Code:
RewriteRule .*\.(gif|png|jpg)$ /images/hotlink.jpg [NC]

to

Code:
RewriteRule .*\.(swf)$ /images/hotlink.jpg [NC]

if that still doesn't work just make a flash for your hotlink, those are better anyways because as you said in the op you can make it click able and lead to your site to screw with them even more.
 
Hey,

I did make the swf change. But I think because the code they are using <embed> doesnt work with an image. So I might make up a swf for to get their traffic.

Thank you very much for the code. I have it saved!
 
Back
Top