It’s really annoying when someone spams your comments in Blogger (or accidentally posts twice). You can delete the comment, but it’s not “really” deleted… instead it has a message saying the comment was deleted by an administrator. In the case of a spammer, it’s really ugly to have 20 or so of those if you ask me.
So I decided to come up with a hack that will remove it. This only works if you run your blog on your own server (FTP or SFTP published) and your server is running Apache with PHP extensions installed.
First I created a PHP file and dropped it in my blogger base directory:
Then I created a .htaccess file in that same folder:
Great… problem solved. Basically it reads the file and spins it through the script before it’s output to the user.
BTW, this is not a detailed “how to”, so use at your own risk and don’t email me if it doesn’t work. 🙂