Hotlinking images

  • Posted: 05 November 2005 08:54 AM

    I was having a problem with external sites hotlinking images and stealing

    The best solution I found was to add the following code to the .htaccess file in the root directory.

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} .
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourwebsite\.com [NC]
    RewriteRule \.(gif|jpe?g)$ - [NC,F]

    I got the information here:

    It offers variations on this solution for other situations.


    It’s safe as long as you remember it’s dangerous…