Subscribe to
Posts
Comments
NSLog(); Header Image

Blocking Access to mt-tb.cgi via Apache Conf File Rewrite Conditions

Since SixAapart is dog slow at fixing problems and adding features to MovableType, I've spent a little while today trying to implement my own mt-tb.cgi whitelist. It goes a little something like this:

RewriteCond %{REMOTE_ADDR} !^127.0.0.1$
RewriteCond %{REMOTE_ADDR} !^64.226.43.134$
RewriteRule ^/cgi-bin/mt-tb.cgi - [F]

Unfortunately, that doesn't work. Even the last line, alone, fails to work. I've put these lines inside the <VirtualHost> (but outside of any <Directory>s) block in my vhosts.conf file (thesandtrap.com is the only vhost on this server).

Does anyone have any ideas how I might get this to work? My thinking is that, by blocking access immediately to the script to anyone but a small, pre-approved list of IPs, I might ease the server load and let mt-tb.cgi work as it should for me. Currently, I rename the script every time I want to send a TrackBack from another article on the site, then rename it back when it's done.

One Response to "Blocking Access to mt-tb.cgi via Apache Conf File Rewrite Conditions"

  1. I've resolved the issue. I had to remove an earlier RewriteBase and the Rule now looks like "mt-tb.cgi - [F]" without the path info.


Trackback URI | Comments RSS

Leave a Reply

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.