I found a script for .htaccess to protect against the use of pictures on another site, but for some reason this script does not work and does not steal.jpg picture steal.jpg . Here is an example http://www.draw-art.ru/photoshop/nature/14/2.jpg . Created a html page on a computer with this address and this page was displayed.

 Options +FollowSymlinks #Запрещаем загрузку файлов с внешних сайтов RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?draw-art.ru/ [nc] RewriteRule .*.(gif|jpg|png)$ http://draw-art.ru/img/steal.jpg[nc] 

    2 answers 2

    Make sure Rewrite works for you. For example, write the simplest script, something like:

     RewriteEngine on RewriteRule .*jpg$ /1.php [L] 

    1.php place in the root of the site. If rewrite is configured, then instead of jpg files the contents of 1.php should be displayed.

    upd:

     Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(www.)?draw-art.ru/ [nc] RewriteRule .*.(gif|jpg|png)$ /img/steal.jpg [nc] 

    It works for me ...

    • yes now displays page 1.php - kvins
    • and now what to do =) - kvins

    Hmmm the point is not shielded?

     RewriteRule .*\.(gif|jpg|png)$ http://draw-art.ru/img/steal.jpg [nc] 

    notice the " \. " and the space before " [nc] "

    • no it did not help ( - kvins