Prevent hot-linking.


Why did you not tell me that you were looking for this and still you couldn’t solve it without that? Let’s look below to that what you were looking for,

These are the codes you would add to your .htaccess and then save the file.

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://novicecamp.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://novicecamp.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.novicecamp.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.novicecamp.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://novicecamp.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://novicecamp.com$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.novicecamp.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://www.novicecamp.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

Note: In these codes above, you are seeing novicecamp.com, simply remove it and add your website instead of novicecamp.com.

What are these codes for? As you said this morning, someone is draining your bandwidth hot-linking your images from your website. These codes will stop it completely.

Finally, your smile made me happy. All the best.

(Please see related posts below)

Leave a Reply

Your email address will not be published. Required fields are marked *