I'm trying to write an htaccess rule to redirect everything to /admin unless it's /users/*
Here's what I have so far, but there's a redirect loop and I can't figure out why:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/admin [NC]
RewriteCond %{REQUEST_URI} !^/users [NC]
RewriteRule ^(.*)$ /admin [R=301,L,NC]
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteRule ^sitemap.xml$ /sitemap [L,P]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>