• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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