Turning tb-spam off -- Way off

| | Comments (1)

If you are having trouble with Movable type comment spam, Or any other blog spam for that matter, this trick might help you out.

A year or so ago, My very happy webhost, emailed me to notify me they had to turn off my mt-tb.cgi script because it was getting spammed to the point where it was bogging down the server.

There are Movable type settings and plugins that prevent junk trackbacks on old entries, but these work by having the mt-tb.cgi script look at the trackback, analyze it and then discard it. The analysis is costs processing power on the server. I came up with the following solution, which seems to work fairly elegantly

I added the following code to my .htaccess file:

RedirectMatch permanent mt-tb.cgi/([0-4][0-9][0-9])$ /mt/errorfile.html
RedirectMatch permanent mt-tb.cgi/([0-9][0-9])$ /mt/errorfile.html
RedirectMatch permanent mt-tb.cgi/([0-9])$ /mt/errorfile.html

Now, whenever anyone sends a trackback to mt-cgi/1 through mt-cgi/499 It gets redirected to an error page which is rendered. There is no analysis done, so I believe the load on the processor is significantly reduced. If you send a trackback to entry 500 or higher, the trackback goes through the regular script.

I will have to edit this periodically, but I do think this significantly limits the damage that spammers can do.

Categories

1 Comments

jreighley Author Profile Page said:

Well, it has been 24 hours, and I have had 0 junk trackbacks! would say that is a Success. I was getting 10-30 per day before yesterday.

Leave a comment

Blogroll

About this Entry

This page contains a single entry by Josh Reighley published on December 6, 2006 2:53 AM.

Kinda A test- Kinda Not was the previous entry in this blog.

Practicing premeditation and playing with HTML is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.0

Vitals

www.flickr.com
This is a Flickr badge showing public photos from jreighley. Make your own badge here.
MSN: jdreighley
ICQ: 3179393
yahoo: jreighley
gtalk: jreighley
Wishlist

    Incoming Comments

    Search


    Technorati

    Technorati search

    » Blogs that link here

    Archives