Foros del Web » Administración de Sistemas » Apache »

htaccess es correcto?

Estas en el tema de htaccess es correcto? en el foro de Apache en Foros del Web. Hola tengo esto en el htaccess de un dominio con sobrecarga de tráfico por robots: Código: #bots bloqueados por exceso de peticiones RewriteCond %{HTTP_USER_AGENT} ^Wget ...
  #1 (permalink)  
Antiguo 29/01/2012, 07:57
Avatar de zanguanga
Moderadora
 
Fecha de Ingreso: julio-2009
Ubicación: España
Mensajes: 1.686
Antigüedad: 14 años, 10 meses
Puntos: 429
htaccess es correcto?

Hola tengo esto en el htaccess de un dominio con sobrecarga de tráfico por robots:


Código:
#bots bloqueados por exceso de peticiones 
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^ePochta_Extractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Sogou [OR]
RewriteCond %{HTTP_USER_AGENT} ^Ezooms
RewriteRule ^.* - [F,L]
¿Podeis confirmarme si es correcto y si puedo añadir otros de la misma forma?
__________________
Mi blog personal | Mi G+
  #2 (permalink)  
Antiguo 29/01/2012, 16:35
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: htaccess es correcto?

los que quieras

Código Apache:
Ver original
  1. RewriteEngine On
  2. RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
  3. RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:[email protected] [OR]
  4. RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
  5. RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
  6. RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
  7. RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
  8. RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
  9. RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
  10. RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
  11. RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
  12. RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
  13. RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
  14. RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
  15. RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
  16. RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
  17. RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
  18. RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
  19. RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
  20. RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
  21. RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
  22. RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
  23. RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
  24. RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
  25. RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
  26. RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
  27. RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
  28. RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
  29. RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
  30. RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
  31. RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
  32. RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
  33. RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
  34. RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
  35. RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
  36. RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
  37. RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
  38. RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
  39. RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
  40. RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
  41. RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
  42. RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
  43. RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
  44. RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
  45. RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
  46. RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
  47. RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
  48. RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
  49. RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
  50. RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
  51. RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
  52. RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
  53. RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
  54. RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
  55. RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
  56. RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
  57. RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
  58. RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
  59. RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
  60. RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
  61. RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
  62. RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
  63. RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
  64. RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
  65. RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
  66. RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
  67. RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
  68. RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
  69. RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
  70. RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
  71. RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
  72. RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
  73. RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
  74. RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
  75. RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
  76. RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
  77. RewriteCond %{HTTP_USER_AGENT} ^Zeus
  78. RewriteRule ^.* - [F,L]


otro método

Código Apache:
Ver original
  1. SetEnvIfNoCase User-Agent ^$ bad_bot
  2. SetEnvIfNoCase User-Agent "^AESOP_com_SpiderMan" bad_bot
  3. SetEnvIfNoCase User-Agent "^Alexibot" bad_bot
  4. SetEnvIfNoCase User-Agent "Anonymouse.org" bad_bot
  5. SetEnvIfNoCase User-Agent "^asterias" bad_bot
  6. SetEnvIfNoCase User-Agent "^attach" bad_bot
  7. SetEnvIfNoCase User-Agent "^BackDoorBot" bad_bot
  8. SetEnvIfNoCase User-Agent "^BackWeb" bad_bot
  9. SetEnvIfNoCase User-Agent "Bandit" bad_bot
  10. SetEnvIfNoCase User-Agent "^Baiduspider" bad_bot
  11. SetEnvIfNoCase User-Agent "^BatchFTP" bad_bot
  12. SetEnvIfNoCase User-Agent "^Bigfoot" bad_bot
  13. SetEnvIfNoCase User-Agent "^Black.Hole" bad_bot
  14. SetEnvIfNoCase User-Agent "^BlackWidow" bad_bot
  15. SetEnvIfNoCase User-Agent "^BlowFish" bad_bot
  16. SetEnvIfNoCase User-Agent "^Bot\ mailto:[email protected]" bad_bot
  17. SetEnvIfNoCase User-Agent "^BotALot" bad_bot
  18. SetEnvIfNoCase User-Agent "Buddy" bad_bot
  19. SetEnvIfNoCase User-Agent "^BuiltBotTough" bad_bot
  20. SetEnvIfNoCase User-Agent "^Bullseye" bad_bot
  21. SetEnvIfNoCase User-Agent "^BunnySlippers" bad_bot
  22. SetEnvIfNoCase User-Agent "^Cegbfeieh" bad_bot
  23. SetEnvIfNoCase User-Agent "^CheeseBot" bad_bot
  24. SetEnvIfNoCase User-Agent "^CherryPicker" bad_bot
  25. SetEnvIfNoCase User-Agent "^ChinaClaw" bad_bot
  26. SetEnvIfNoCase User-Agent "Collector" bad_bot
  27. SetEnvIfNoCase User-Agent "Copier" bad_bot
  28. SetEnvIfNoCase User-Agent "^CopyRightCheck" bad_bot
  29. SetEnvIfNoCase User-Agent "^cosmos" bad_bot
  30. SetEnvIfNoCase User-Agent "^Crescent" bad_bot
  31. SetEnvIfNoCase User-Agent "^Curl" bad_bot
  32. SetEnvIfNoCase User-Agent "^Custo" bad_bot
  33. SetEnvIfNoCase User-Agent "^DA" bad_bot
  34. SetEnvIfNoCase User-Agent "^DISCo" bad_bot
  35. SetEnvIfNoCase User-Agent "^DIIbot" bad_bot
  36. SetEnvIfNoCase User-Agent "^DittoSpyder" bad_bot
  37. SetEnvIfNoCase User-Agent "^Download" bad_bot
  38. SetEnvIfNoCase User-Agent "^Download\ Demon" bad_bot
  39. SetEnvIfNoCase User-Agent "^Download\ Devil" bad_bot
  40. SetEnvIfNoCase User-Agent "^Download\ Wonder" bad_bot
  41. SetEnvIfNoCase User-Agent "Downloader" bad_bot
  42. SetEnvIfNoCase User-Agent "^dragonfly" bad_bot
  43. SetEnvIfNoCase User-Agent "^Drip" bad_bot
  44. SetEnvIfNoCase User-Agent "^eCatch" bad_bot
  45. SetEnvIfNoCase User-Agent "^EasyDL" bad_bot
  46. SetEnvIfNoCase User-Agent "^ebingbong" bad_bot
  47.  
  48. # agregar mas si se quiere
  49.  
  50. <Files *>
  51. Order Allow,Deny
  52. Allow from all
  53. Deny from env=bad_bot
  54. </Files>


Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.
  #3 (permalink)  
Antiguo 29/01/2012, 17:21
Avatar de zanguanga
Moderadora
 
Fecha de Ingreso: julio-2009
Ubicación: España
Mensajes: 1.686
Antigüedad: 14 años, 10 meses
Puntos: 429
Respuesta: htaccess es correcto?

Muchas gracias por responder, y por las listas, tomo nota

Buscando documentación, he visto también que algunos sitios recomiendan listas parecidas pero en la última línea, en lugar de devolver una pagina de error, redirigen directamente a otro sitio, por ejemplo:

Código:
RewriteRule ^(.*)$ http://www.robotstxt.org/
¿Que método os parece mejor?
¿Hay diferencia entre devolver error y rebotar a otro sitio respecto a la carga del servidor?

¿O al redireccionar puedes estar haciéndole una faena a otro sitio enviándole toda esa porquería?
__________________
Mi blog personal | Mi G+

Última edición por zanguanga; 29/01/2012 a las 17:25 Razón: tercera pregunta
  #4 (permalink)  
Antiguo 29/01/2012, 17:32
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: htaccess es correcto?

La idea es bloquear los bots, el resto va a afectar el comportamiento del software que estén usando. Asi que no hace mucha diferencia, Creo que la generación de un error 403 es suficiente y no justifica la redirección a páginas de terceros

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.
  #5 (permalink)  
Antiguo 29/01/2012, 17:42
Avatar de zanguanga
Moderadora
 
Fecha de Ingreso: julio-2009
Ubicación: España
Mensajes: 1.686
Antigüedad: 14 años, 10 meses
Puntos: 429
Respuesta: htaccess es correcto?

Excelente respuesta, muchísimas gracias
__________________
Mi blog personal | Mi G+

Etiquetas: htaccess, rewrite
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:40.