1. Prevent from cPanel (x2 theme).
Login to cPanel. You will find hotlink protection icon from where you can enable hot link protection.
2. Prevent from .htaccess file.
You can directly place below code in your .htaccess file to disable hot linking:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp|wmv)$ http://www.yourdomain.com/image.jpg [R,NC]
Note: replace yourdomain.com with your domain name.
Thanks!
Comments & Discussion (0)
No comments yet. Be the first to share your thoughts!
Leave a Comment
Sign in to join the conversation
Please log in or create a free account to post comments, ask questions, and engage with the web hosting community.