.htaccess mod_rewrite – how to exclude directory from rewrite rule October 18, 2022 by Tarik Try this rule before your other rules: RewriteRule ^(admin|user)($|/) - [L] This will end the rewriting process.