Home / Basics / Hotlink protection: How-To prevent people from stealing your files

Hotlink protection: How-To prevent people from stealing your files

Create an .htaccess file in your public_html directory with the following code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?
domain.com.*$ [NC]
RewriteRule .(gif|jpg)$ – [F]

Where domain.com is your domain.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  •  
    Previous Post

    WHM : Spamassassin / spamd not working

  •  
    Next Post

    Performance tuning tools: ps, top, sar, iostat, and vmstat