elmwood
12-01-2007, 12:39 AM
My Web site is getting hit hard -- pretty much, requests every ten seconds or so -- for URLs like this:
/forums/showthread.php?t=http://hotrXXXXXXXXXaebywka.chat.ru/images/girl?
(Added the XXXs, so you don't get malware or virii from attempting to visit the site.)
Fortunately, my site is pretty secure against the attacks. Still, it's frustrating; I mean, you would think the Russians would know by now that their injection attacks aren't working on my site.
What I'd like to do is use .htaccess to redirect URLs that contain certain strings common in the injection attacks (girl, cmd.txt, check.txt, cs.txt, image.txt, .ru/) and redirect them to a .php script that I already have set up which will add their IP to the deny list in my .htaccess file.
I've searched far and wide through various .htaccess tutorials, and found nothing. Lots of references for redirecting whole URLs to other pages, but nothing for URLs including a certain string. I suck at regular expressions; I tried, and had no luck.
Any ideas? Again, all I want to do is redirect anyone trying to visit a URL that includes a certain string to something like /ban.php. Any better way that you might know of to deal with the attack?
/forums/showthread.php?t=http://hotrXXXXXXXXXaebywka.chat.ru/images/girl?
(Added the XXXs, so you don't get malware or virii from attempting to visit the site.)
Fortunately, my site is pretty secure against the attacks. Still, it's frustrating; I mean, you would think the Russians would know by now that their injection attacks aren't working on my site.
What I'd like to do is use .htaccess to redirect URLs that contain certain strings common in the injection attacks (girl, cmd.txt, check.txt, cs.txt, image.txt, .ru/) and redirect them to a .php script that I already have set up which will add their IP to the deny list in my .htaccess file.
I've searched far and wide through various .htaccess tutorials, and found nothing. Lots of references for redirecting whole URLs to other pages, but nothing for URLs including a certain string. I suck at regular expressions; I tried, and had no luck.
Any ideas? Again, all I want to do is redirect anyone trying to visit a URL that includes a certain string to something like /ban.php. Any better way that you might know of to deal with the attack?