How To Block Hotlinkers

«»

Page : 1 2 3 4 5 6 7 8ALL

one’s URL on the image. It wouldn’t hurt to get some free advertising in the process.

This is how to disable hot linking of certain file types on one’s site through .htaccess by simply adding the code below to one’s .htaccess file. Uploading the file either to the root directory or a particular subdirectory is necessary to localize the effect to just one section of the site.

RewriteEngine on
RewriteCond%{HTTP_REFERER}!^$
RewriteCond%{HTTP_
REFERER}!^http://(www.)?mydomain.com/.$[NC]
RewriteRule.(gif/jpg/js/css)$-[F]
The “my http://domain.com” is to be replaced by one’s own. The above code creates a failed request when hot

Page : 1 2 3 4 5 6 7 8ALL

Pages: 1 2 3 4 5 6 7 8

Get the book now