Htaccess Prevent Hotlinking Images

Posted on August 1, 2013 at 9:38 am

Write this text in your .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?YourDomain [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

Change YourDomain with the name of your domain.

Updated on October 22, 2013 at 3:54 pm

Receive updates via email

Other Posts

Updated Posts