Common Mod Rewrites:

Stop hotlinking (no Image):

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.|images\.)?google.(de|com|at|pl|fr|nl|it|com.tr|es|ch|be|gr|com.br|lu|fi|pt|hu|hr|bg|com.mx|si|sk|ro|ca|co.uk|cl|com.ar|se|cz|dk|co.th|com.co|lt|co.id|co.in|co.il|com.eg|cn|co.ve|ru|co.jp|com.pe|com.au|co.ma|co.za|com.ph|com.sa|ie|co.kr|no|com.ec|com.vn|lv|com.mt|com.uy|ae|ba|co.nz|com.ua|co.cr|ee|com.do|com.tw|com.hk|com.my|com.sv|com.pr|lk|com.gt|com.bd|com.pk|is|li|com.bh|com.ni|com.py|com.ng|com.bo|co.ke|hn|com.sg|mu|ci|jo|nu|com.jm|com.ly|co.yu|tt|com.kh|ge|com.na|com.et|sm|cd|gm|com.qa|dj|com.cu|com.pa|gp|az|as|pl|mn|ht|md|am|sn|je|com.bn|com.ai|co.zm|ma|rw|co.ug|com.vc|com|at|com.gi|to|com.om|kz|co.uz)(/)?.*$ [NC]
RewriteRule .*\.(gif|jpe?g|png|bmp)$ [F,NC]

Stop hotlinking (replacing Image):

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.|images\.)?google.(de|com|at|pl|fr|nl|it|com.tr|es|ch|be|gr|com.br|lu|fi|pt|hu|hr|bg|com.mx|si|sk|ro|ca|co.uk|cl|com.ar|se|cz|dk|co.th|com.co|lt|co.id|co.in|co.il|com.eg|cn|co.ve|ru|co.jp|com.pe|com.au|co.ma|co.za|com.ph|com.sa|ie|co.kr|no|com.ec|com.vn|lv|com.mt|com.uy|ae|ba|co.nz|com.ua|co.cr|ee|com.do|com.tw|com.hk|com.my|com.sv|com.pr|lk|com.gt|com.bd|com.pk|is|li|com.bh|com.ni|com.py|com.ng|com.bo|co.ke|hn|com.sg|mu|ci|jo|nu|com.jm|com.ly|co.yu|tt|com.kh|ge|com.na|com.et|sm|cd|gm|com.qa|dj|com.cu|com.pa|gp|az|as|pl|mn|ht|md|am|sn|je|com.bn|com.ai|co.zm|ma|rw|co.ug|com.vc|com|at|com.gi|to|com.om|kz|co.uz)(/)?.*$ [NC]
RewriteRule \.(gif|jpe?g|png|bmp)$ /images/humiliatingimage.gif [L,NC]

Force traffic to WWW:

RewriteEngine On
RewriteCond %{HTTP_HOST} !www.example.com
RewriteRule ^.*$     http://www.example.com%{REQUEST_URI} [R]

Force traffic to new Domain:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.net/$1 [R=301,L]

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *