Page 1 of 1

Stop off-site linking?

PostPosted: 29. June 2011 20:15
by mikealex2k12
I was just wondering how I can stop off-site linking so other sites can't link to my downloads?

Re: Stop off-site linking?

PostPosted: 29. June 2011 21:22
by WilliL
you can handle this with mod_rewrite http://httpd.apache.org/docs/2.2/rewrite/access.html

Re: Stop off-site linking?

PostPosted: 30. June 2011 23:10
by mikealex2k12
So I need...

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !www.example.com [NC]
RewriteRule \.(gif|jpg|png)$ /images/go-away.png [R,NC]

and place (rar) in the rewriterule and my IP in the rewritecond. The only thing is, is what file does this go in and where?

Re: Stop off-site linking?

PostPosted: 01. July 2011 00:56
by JonB