Soporte » Seguridad » Evitar Hotlinking desde htaccess

  • Resuelto Astromicologist

    (@astromicologist)


    Hola

    ¿Esta bien así este código para evitar el hotlinking desde el htaccess?

    
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mi dominio.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.es [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yandex.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ecosia.org [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?duckduckgo.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?baidu.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ask.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?aol.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?facebook.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?twitter.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?instagram.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?pinterest.com [NC]
    RewriteRule \.(pdf|flv|jpg|jpeg|png|gif|webp)$ https://i.postimg.cc/qM5qYZ0F/404bicho.gif [NC,R,L]
    

    Gracias.

Viendo 3 respuestas - de la 1 a la 3 (de un total de 3)
Viendo 3 respuestas - de la 1 a la 3 (de un total de 3)
  • Debes estar registrado para responder a este debate.