Protection from hotlinking

You can use the following .htaccess file to ensure that your home page files are really only being retrieved by visitors to your site, and are not being abused by third party sites:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.tld(/.*)?$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|zip|mpg|GIF|JPG|JPEG|PNG|ZIP|MPG)$ - [F]

Replace domain.tld with your domain name. Add additional file endings if needed.

This is particulary useful for protecting pictures, videos, or other larger files. You should not use this method to protect HTML or PHP files; otherwise, it will no longer be possible to link your site.

  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

Account migration

Did Progressive Robot already transfer my saved customer data from Progressive Robot Console to...

File authorization

You need to set file permissions for static HTML pages to at least "604" using the "chmod"...

Hardware Exchange Service

It is possible to switch your managed server and migrate your data, configurations, and IP...

Language dependent page views

How can the corresponding pages be automatically called in the required language? Our servers...

Paths of frequently used programs

Sendmail /usr/sbin/sendmail   Perl Interpreter /usr/bin/perl First, please check in...

Powered by WHMCompleteSolution