RewriteRule main.php, taking account of index.php