Debug Apache mod_rewrite, with sample output
From http://stackoverflow.com/questions/7738170/how-to-debug-htaccess-rewrite-script