Foros del Web » Creando para Internet » Diseño web »

Htaccess bloqueo url

Estas en el tema de Htaccess bloqueo url en el foro de Diseño web en Foros del Web. Hola, lo que necesito es bloquear mediante htaccess todo referer que tenga en su url la palabra "insulto" por ejemplo: http://www.do-mi-ñ-o.com/insulto.html He encontrado la menera ...
  #1 (permalink)  
Antiguo 25/09/2008, 07:12
 
Fecha de Ingreso: febrero-2006
Mensajes: 72
Antigüedad: 18 años, 9 meses
Puntos: 2
Htaccess bloqueo url

Hola,
lo que necesito es bloquear mediante htaccess todo referer que tenga en su url la palabra "insulto" por ejemplo: http://www.do-mi-ñ-o.com/insulto.html

He encontrado la menera de rechazar/direccionar todo el dominio, la ip, etc, pero solo quiero filtrar palabras inconvenientes.

Saludos y gracias adelantadas.
  #2 (permalink)  
Antiguo 25/09/2008, 08:48
Avatar de radarcba  
Fecha de Ingreso: mayo-2005
Ubicación: ureleando
Mensajes: 505
Antigüedad: 19 años, 6 meses
Puntos: 3
Respuesta: Htaccess bloqueo url

Un tutorial:
http://www.ajota.es/2006/12/mod_rewrite_con.html

Proba con este código, en realidad es para prevenir inyección de código, pero a lo mejor estudiandolo te sirve:

Código:
# proteccion contra spammers y hackers!
 

# .fixed (no remover esta linea!)

# Enciende la reescritura
RewriteEngine On
Options +FollowSymLinks

# 403 para evitar inyeccion de codigo
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(-|\.|') [OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(<|>|%3C|%3E)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(libwww-perl|libwwwperl|snoopy|curl|wget|winhttp|python|nikto|scan|clshttp|archiver|loader|email|harvest|fetch|extract|grab|miner|suck|reaper|leach)(.*) [NC]
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:[email protected] [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Custo [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^DISCo [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^eCatch [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^GetRight [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Grafula [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^HMView [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^InterGET [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} Java [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^JetCar [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^larbin [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^lwp:: [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^lwp- [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Navroad [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^NearSite [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Octopus [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^pavuk [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^ReGet [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Schmozilla [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^webcollage [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Wget [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Widow [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Zeuse [NC] 
RewriteRule ^.*$ - [F]
__________________
Maldición va a ser un día hermoso... PR
Tetris, correo & TU IP
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

SíEste tema le ha gustado a 1 personas




La zona horaria es GMT -6. Ahora son las 05:56.