What is hotlinking in webmaster terminology?
Does it mean that my website disallow some external site to load my websites content during thirdparty site loading?
Is it good idea to turn off hotlinking php, html, js, jpg, zip files?
Example of turning off hotlinking
Enter this code into ".htaccess" file in your website root directory:
(PS: make sure, there are no spaces in "...bmp|zip|rar|mp3|flv|swf|xml|..." part. this forum makes spaces in long words..)RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)mysite.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|pn g|css|pdf)$ - [F]
Example of serving alternative image on hotlinking
(PS: make sure, there are no spaces in "...bmp|zip|rar|mp3|flv|swf|xml|..." part. this forum makes spaces in long words..)RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)mysite.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|pn g|css|pdf)$ http://www.mysite.com/hotlinking_forbidden.gif [R,L]
Bookmarks