• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved can't find hotlink protection option plesk 12.5.30

Arman

New Pleskian
HI,
i can't find hotlink protection option in plesk 12.5.30 web pro edition centos 6.7 ? how can i enable hotlink protection.

Thanks
 
Or the alternative with htaccess (apache)
Code:
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{HTTP_REFERER} !^$
   #---------------if your are business because i get your logo website---------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?exemple.gtld [NC]
   #---------------CDN---------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?cloudflare.com [NC]
   #------------------search engine------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yandex.ru [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yandex.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yahoo.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?bing.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?baidu.com [NC]
   #--------------Social networks----------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?facebook.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?twitter.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?linkedin.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?viadeo.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?delicious.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?stumbledupon.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?pinterest.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?tumblr.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?foursquare.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?tumblr.com [NC]
   #-----------------Radio online-------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?tunein.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?shoutcast.com [NC]
   RewriteCond %{HTTP_REFERER}  !search\?q=cache  [NC]
   RewriteCond %{HTTP_REFERER}  !google\.   
   RewriteRule \.(gif|jpe?g?|png|bmp|avi|mp4|flv|pls|m3u|asx|xspf|qtl)$ http://www.yourdomainname.tld/blocked.jpg [NC,R,L]
</IfModule>
 
Or the alternative with htaccess (apache)
Code:
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{HTTP_REFERER} !^$
   #---------------if your are business because i get your logo website---------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?exemple.gtld [NC]
   #---------------CDN---------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?cloudflare.com [NC]
   #------------------search engine------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yandex.ru [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yandex.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yahoo.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?bing.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?baidu.com [NC]
   #--------------Social networks----------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?facebook.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?twitter.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?linkedin.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?viadeo.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?delicious.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?stumbledupon.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?pinterest.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?tumblr.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?foursquare.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?tumblr.com [NC]
   #-----------------Radio online-------------------------#
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?tunein.com [NC]
   RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?shoutcast.com [NC]
   RewriteCond %{HTTP_REFERER}  !search\?q=cache  [NC]
   RewriteCond %{HTTP_REFERER}  !google\.  
   RewriteRule \.(gif|jpe?g?|png|bmp|avi|mp4|flv|pls|m3u|asx|xspf|qtl)$ http://www.yourdomainname.tld/blocked.jpg [NC,R,L]
</IfModule>

If you use NGINX as well, you might consider to convert your EXAMPLE - HTACCESS - rules for this case and add it at: Home > Subscriptions > yourdomainname.COM > Websites & Domains > Apache & nginx Settings

Code:
if ($http_referer !~ "^$"){
    set $rule_0 1$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?exemple.gtld"){
    set $rule_0 2$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?cloudflare.com"){
    set $rule_0 3$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?yandex.ru"){
    set $rule_0 4$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?yandex.com"){
    set $rule_0 5$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?yahoo.com"){
    set $rule_0 6$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?bing.com"){
    set $rule_0 7$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?baidu.com"){
    set $rule_0 8$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?facebook.com"){
    set $rule_0 9$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?twitter.com"){
    set $rule_0 10$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?linkedin.com"){
    set $rule_0 11$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?viadeo.com"){
    set $rule_0 12$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?delicious.com"){
    set $rule_0 13$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?stumbledupon.com"){
    set $rule_0 14$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?pinterest.com"){
    set $rule_0 15$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?tumblr.com"){
    set $rule_0 16$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?foursquare.com"){
    set $rule_0 17$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?tumblr.com"){
    set $rule_0 18$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?tunein.com"){
    set $rule_0 19$rule_0;
}
if ($http_referer !~* "^https?://([^.]+\.)?shoutcast.com"){
    set $rule_0 20$rule_0;
}
if ($http_referer !~* "search\?q=cache"){
    set $rule_0 21$rule_0;
}
if ($http_referer !~ "google\."){
    set $rule_0 22$rule_0;
}
if ($rule_0 = "22212019181716151413121110987654321"){
    rewrite /\.(gif|jpe?g?|png|bmp|avi|mp4|flv|pls|m3u|asx|xspf|qtl)$ http://www.yourdomainname.tld/blocked.jpg redirect;
}
 
Back
Top