Stop off-site linking?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Stop off-site linking?

Postby mikealex2k12 » 29. June 2011 20:15

I was just wondering how I can stop off-site linking so other sites can't link to my downloads?
mikealex2k12
 
Posts: 9
Joined: 06. December 2010 22:06

Re: Stop off-site linking?

Postby WilliL » 29. June 2011 21:22

you can handle this with mod_rewrite http://httpd.apache.org/docs/2.2/rewrite/access.html
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Stop off-site linking?

Postby mikealex2k12 » 30. June 2011 23:10

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?
mikealex2k12
 
Posts: 9
Joined: 06. December 2010 22:06

Re: Stop off-site linking?

Postby JonB » 01. July 2011 00:56

User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 125 guests