Block them with a firewall rather than trying to do it after they've already gotten to your web server (??).