RewriteEngine On

# Admin routes directly to admin.php (index.php and admin.php share function names)
RewriteRule ^admin$ admin.php [L,QSA]

# Pass through real files (avatars, images, etc.)
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

# Pass through real directories
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Route everything else through index.php
RewriteRule ^ index.php [L]
