Click to See Complete Forum and Search --> : how to prevent visitors to show images on thier sites


seco
09-28-2007, 07:27 PM
Hi
i want to prevent visitors from previewing the images of my website on their sites
some times i see some sites make the link of the images is the url of the website like www.somesite.com

how to do that?

thanks in advance.

aussie girl
09-28-2007, 11:02 PM
Do some researching on Hotlinking or direct linking

bokeh
09-29-2007, 07:09 AM
Make a .htaccess file, placed at HTTP root with the following content:<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER}---%{HTTP_HOST} !^http://([^/]+)/.*---\1$ [NC]
RewriteRule \.(gif|jpg)$ - [F,L]
</IfModule>I wrote that rule so it is dynamic, i.e. it should work fine on any site (that's running Apache and mod rewrite).