1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
| Options +FollowSymlinks
RewriteEngine on
# Blocage des aspirateurs de site #
#----------------------------------
# %{HTTP_USER_AGENT} Fournit les informations du type de navigateur client et le système d'exploitation
# [NC] Indique que le motif n'est pas sensible à la casse (aucune différence entre MAJ et minus)
# ^ Ancre de début de ligne
# $ Ancre à la fin de ligne
# [X-Y] Indique une alternative de chiffre/lettre entre X et Y
# \ Expression régulière permettant d'écrire un caractère tel qu'un espace, un point
# \ symbôle pour écrire un espace : "alt+92" puis Barre Espace
# \. Caractère litéral point
# * Indique une suite de caractères/chiffres ex: *siphon peu être EmailSiphon ou taratataSiphon
# - _ \ peuvent être écrit sans autre
# Le motifs (Exemple: Googlebot) sans caractère spéciaux, indique une recherche de Googlebot dans la chaine le mot
# ce qui est pratique en cas de plusieurs versions
#=== Quelques types d'écritures ========
RewriteCond %{HTTP_USER_AGENT} @nonymouse [NC,OR]
RewriteCond %{HTTP_USER_AGENT} [0-9A-Za-z]{15,} [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^!Susie [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^-?$ [NC,OR] #Navigateurs non-renseignés
RewriteCond %{HTTP_USER_AGENT} ^Advanced\ Email\ Extractor* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} abcfr_robot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Apple\ PubSub [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Balihoo/Nutch [NC,OR]
RewriteCond %{HTTP_USER_AGENT} BStop\.BravoBrian\.it [NC,OR]
...
...
RewriteCond %{HTTP_USER_AGENT} Wget [NC,OR]
RewriteCond %{HTTP_USER_AGENT} WinHTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^A1\ Website\ Download* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^A1\ Website\ Download/2* [NC,OR]
#Liste des navigateurs internet
#=======================
#Navigateurs : IE2 IE3 IE4 IE6
RewriteCond %{HTTP_USER_AGENT} Msie.[2-6] [NC,OR]
#OK! Uniquement IE8
#RewriteCond %{HTTP_USER_AGENT} .*Msie\ 8* [NC,OR]
#OK! Pour tous MSIE
#RewriteCond %{HTTP_USER_AGENT} Msie* [NC,OR]
#Navigateurs : Opera
#RewriteCond %{HTTP_USER_AGENT} Opera/5.0 [NC,OR] #(Linux 2.0.38 i386; U) [en]*
#RewriteCond %{HTTP_USER_AGENT} Opera/5.11 [NC,OR] #(Windows ME; U) [ru]*
#RewriteCond %{HTTP_USER_AGENT} Opera/5.12 [NC,OR] #(Windows 98; U) [en]*
#RewriteCond %{HTTP_USER_AGENT} Opera/6.01 [NC,OR] #(larbin@unspecified.mail)*
#RewriteCond %{HTTP_USER_AGENT} Opera/6.x [NC,OR] #(Linux 2.4.8-26mdk i686; U) [en]*
#RewriteCond %{HTTP_USER_AGENT} Opera/6.x [NC,OR] #(Windows NT 4.0; U) [de]*
#RewriteCond %{HTTP_USER_AGENT} Opera/7.x [NC,OR] #(Windows NT 5.1; U) [en]*
#RewriteCond %{HTTP_USER_AGENT} Opera/8.xx [NC,OR] #(Windows NT 5.1; U; en)*
#RewriteCond %{HTTP_USER_AGENT} Opera/9.0 [NC,OR] #(Windows NT 5.1; U; en)*
#RewriteCond %{HTTP_USER_AGENT} Opera/9.00 [NC,OR] #(Windows NT 5.1; U; de)*
#RewriteCond %{HTTP_USER_AGENT} Opera/9.60 [NC,OR] #(Windows NT 5.1; U; de) Presto/2.1.1
RewriteCond %{HTTP_USER_AGENT} ABrowse [NC,OR]
#Autres...
#=======
# Un hôte qui tente de se cacher dans une reverse DNS lookup
RewriteCond %{REMOTE_HOST} ^private$ [NC,OR]
# Sites de surveillance du Web (peut nécessiter ipchains)
RewriteCond %{HTTP_USER_AGENT} traffixer [NC,OR]
RewriteCond %{HTTP_USER_AGENT} netfactual [NC,OR]
RewriteCond %{HTTP_USER_AGENT} netcraft [NC,OR]
# Un faux referrer souvent utilisé
RewriteCond %{HTTP_USER_AGENT} ^[^?]*iaea\.org [NC,OR]
# Le referrer "addresses.com" est utilisé par un email address extractor
RewriteCond %{HTTP_USER_AGENT} ^[^?]*addresses\.com [NC,OR]
# Bloque les navigateurs se dissimulants avec des lettres et chiffres aléatoires
RewriteCond %{HTTP_USER_AGENT} [0-9A-Za-z]{15,} [OR]
RewriteCond %{HTTP_USER_AGENT} ^[0-9A-Za-z]+$ [OR]
# Un faux referrer utilisé en conjonction avec un formmail exploits
RewriteCond %{HTTP_USER_AGENT} ^[^?]*\.ideography\.co\.uk [NC]
#[L] Arrête le traitement de réécriture en ce point et n'applique plus aucune régle postérieure.
#[R] Force une redirection
#[F] Forbindden Error 403
RewriteRule .* - [F]
#RewriteRule ^(.*)$ <a href="http://www.google.com/webhp?hl=zh-CN/" target="_blank">http://www.google.com/webhp?hl=zh-CN/</a> [L,R=301]
RewriteEngine off |
Partager