htaccess hotlink protection
htaccess hotlink protection
Protect your website bandwidth from other websites that tries to hotlink your images. Htaccess hotlink protection is the right way to do it.
Very simple you can prevent this using a .htaccess file in your images directory and add the following code
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yoursitename\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ nohotlink.jpg [L]
Once the htaccess file is saved put it under your WWW directory or to any other location which needs all your images to be protected.
Simple 🙂
htaccess hotlink protection,