On the connected subject of blocking certain url params I came across this excellent post of how to do it using apache: Eight Ways to Blacklist with Apache's mod_rewrite | Perishable Press
Well worth the read.
[edit]
and there’s more! (quote from the author) I am serious about site security. Nothing gets my juices flowing like the thought of chopping up mindless cracker whores into small, square chunks and feeding their still-twitching flesh to a pack of starving mongrels
Andrew