Tag Archive | Prevent Hotlinking

20+ .htaccess Hacks Every Web Developer Should Know About

1. Prevent Hotlinking Tired of people using your bandwidth by putting the images hosted on your server on their website? Add the following code at the bottom of your .htaccess file to prevent hotlinking. 1 Options +FollowSymlinks 2 #Protect against hotlinking 3 RewriteEngine On 4 RewriteCond %{HTTP_REFERER} !^$ 5 RewriteCond %{HTTP_REFERER} !^http://(www.)?domainname.com/ [nc] 6 RewriteRule […]