Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/05/2015, 09:06
Avatar de lauser
lauser
Moderator Unix/Linux
 
Fecha de Ingreso: julio-2013
Ubicación: Odessa (Ukrania)
Mensajes: 3.278
Antigüedad: 10 años, 9 meses
Puntos: 401
Respuesta: Interesante modificación de Awstats para controlar hotlinking

Si lo conocía, pero es super engorroso y tienes que estar siempre pendiente de ello. Mucho mas practico reglar en htaccess el hotlinking y se acabo el problema... sin preocupaciones.

Código Apache:
Ver original
  1. RewriteEngine on
  2. RewriteCond %{HTTP_REFERER} !^http://tuweb.es*/.*$ [NC]
  3. RewriteCond %{HTTP_REFERER} !^http://tuweb.es*$ [NC]
  4. RewriteRule .*\.(gif|jpg|jpeg|bmp|png|zip|rar|mp3|flv|swf|xml|css|pdf)$ - [F,NC]
  5. #bloqueamos mas tipos de archivo_quita o añade a tu elección.

Los buscadores de imágenes también dejaran de indexar (solo los de imágenes). Así que si queremos que nos sigan indexando colocaremos estas otras reglas:
Código Apache:
Ver original
  1. RewriteEngine On
  2. RewriteCond %{HTTP_REFERER} !^$
  3. RewriteCond %{HTTP_REFERER} !tuweb\.es [NC]
  4. RewriteCond %{HTTP_REFERER} !google\. [NC]
  5. RewriteCond %{HTTP_REFERER} !msn\. [NC]
  6. RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
  7. RewriteCond %{HTTP_REFERER} !altavista\. [NC]
  8. RewriteCond %{HTTP_REFERER} !ask\. [NC]
  9. RewriteCond %{HTTP_REFERER} !archive\.org [NC]
  10. RewriteCond %{HTTP_REFERER} !bing\. [NC]
  11. RewriteCond %{HTTP_REFERER} !feedburner.com/.*$ [NC]
  12. RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$ - [F,NC]
  13. #bloqueamos mas tipos de archivo_quita o añade a tu elección.

Si quieres que cuando usurpen tu imagen, les aparezca otra definida por ti-----jaja,,, añade lo siguiente.
Código Apache:
Ver original
  1. RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://www.tuweb.es/imagenes/Hola_Listillo.jpg [L,NC]
__________________
Los usuarios que te responden, lo hacen altruistamente y sin ánimo de lucro con el único fin de ayudarte. Se paciente y agradecido.
-SOLOLINUX-

Última edición por lauser; 15/05/2015 a las 09:10 Razón: Imagen de suplantacion