Improved mod_rewrite check