Adding .htaccess mod_rewrite rules for proper web server handling