made mod_rewrite rules smarter