htaccess - disable hotlinking of images

0 votes
216 views
added Jul 19, 2018 in Server issues by LC Marshal Captain (25,790 points)
#disable hotlinking of images with forbidden or custom image option

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?sparringmind.com [NC]

RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]

RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feeds2.feedburner.com/sparringmind [NC]

RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...