Hi all, I would like to share this small code with DP users. Today I have noticed some idiots using iframe to use my website on their domain..so after quick search I have found this nice code which you can use to block anyone from linking to your website contents illegally, you can block all sort of files jpg, html, php, flash, videos, mp3 and so on. Trust me I have use it and it works, and on the stealer's end they will see Forbidden 500 error... RewriteEngine On RewriteCond %{HTTP_REFERER} website1.com [OR,NC] RewriteCond %{HTTP_REFERER} website2.net [OR,NC] RewriteCond %{HTTP_REFERER} website3.co.cc [NC] RewriteRule .*.(gif|jpg|swf|png|html|php|asp|xml|htm)$ - [NC,F] just copy and paste the above code in your .htaccess file on your server, if you do not have one just copy and paste in txt file using notepad and rename it exactly like this .htaccess oh do not forget to replace the website1, website2 and website3 with the website(s) you wish to block, you can add more website lines to block, also you can add/remove different file extension to block....once done upload to your server and see the error on their side I hope this helps here is the original source where I found this code: http://support.modwest.com/content/...they-steal-images-flash-etc-from-my-site.html Stop contents theft
To prevent all websites from hotlinking, you can use this code: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L] Code (markup): Change yourdomain.com with your domain name. This will redirect visitors to your homepage.
A+ to this. I was looking for something like this a long time ago with a problem I was having and this was actually the solution I used. I'm glad to see someone sharing it =)
still not safe. there are other ways to steal web contents not just using iframes like for example php curl, http_client, file_get_contents etc.
Okay, you should then in light us with some ideas instead of pointing out the wholes without providing the solution for them..
Thanks for the share. I think I've heard about it before but my websites don't need to be protected anyway.
This is probably the most effective method against hotlinking, just a lfew htaccess rules. But, this will not protect your content from being saved and re-uploaded anywhere (Which is basically impossible, if it can be seen or heard it can be copied).