Explain me how do I prevent my images from being hot-linked by another website?
Answer Posted / Shivam Rathaur
To prevent hotlinking of images, you can edit your .htaccess file and add the following code:nn# Disable image hotlinkingnRewriteEngine OnnRewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?yoursite.com[n/]*$
RewriteRule .(jpg|jpeg|png|gif)$ - [F,NC]
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers