View Single Post
  #4  
Old 29-07-13, 23:32
wMan's Avatar
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Thumbs up Disable Hotlinking
Add the below code to your .htaccess file (blank or existing), and upload to your root web directory:
Enter a list of ALLOWED domains/ site IPs below that will be allowed to access the specified file types
Code:
## DISABLE HOTLINKING
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourotherdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|js|css)$ - [F]
Visitor IP Banning
Add the below code to your .htaccess file (blank or existing), and upload to your root web directory:
Code:
## USER IP BANNING
<Limit GET POST>
 order allow,deny
 deny from 42.12.5.34
 deny from 193.110.145.185
 deny from 212.173.53.
 deny from 69.242.
 allow from all
</Limit>
example

Code:
Redirect /include/ http://localhost/pic/finger.jpg
Redirect /torrents/ http://localhost/pic/finger.jpg
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
## DISABLE HOTLINKING
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourotherdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|js|css)$ - [F]
## USER IP BANNING
<Limit GET POST>
 order allow,deny
 deny from 42.12.5.34
 deny from 193.110.145.185
 deny from 212.173.53.
 deny from 69.242.
 allow from all
</Limit>

Last edited by wMan; 30-07-13 at 12:20.
Reply With Quote