Changed some rewrite rules to fix broken links