Forum Moderators: phranque
Well, comment spammers are nothing if not persistent, I guess. I haven't used MT in the last year and a half and haven't even had a site for the last six months and they are STILL TRYING!
So, here's what I need some help on. I want to create an .htaccess file that redirects CGI requests...somewhere else...like maybe to a Windows XP service pack download or something. I want them off of my site and (ideally) to go somewhere else that punishes them all for still trying to access this file that hasn't existed since 2005 (like downloading a 250 MB file).
How do I do this? I've tried modifying a few things I've found on the internet (like image hotlink blockers), but they aren't working for me when I change them to CGI files.
Anyone have any suggestions?
And you also want to "punish" the site to which you redirect these harvesters and punish all Web users by tying up Web bandwidth while doing it? -- That's not an acceptable use of the Web, IMO.
The simplest approach is to simply 403 these guys and be done with it:
RewriteRule ^mt-comments\.cgi$ - [F]
ErrorDocument 403 /special/403null.html
#
RewriteRule !^403null\.html$ - [F]
RewriteRule ^mt-comments\.cgi$ /special/index.html [L]
Note also that none of this will work if your cgi-bin is an "aliased" directory and if you are unable to put an .htaccess file into the actual cgi script directory -- The Alias directive will usually be processed before mod_rewrite has a chance to kick in, and in that case, mod_rewrite in your root directory won't work for cgi requests -- the code will have to be moved to the aliased cgi directory to work.
Jim