Very good idea - so good in fact that the Joomla Devs used similar techniques to block the most common Joomla exploits with mod_rewrite (htaccess file included with 1.5.9 includes these). I'd be cautious about using some of the specific techniques mentioned in that article, as they will conflict with Joomla.