RewriteEngine On

# Force HTTPS in production (commented out for local XAMPP dev — uncomment on live hosting)
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Serve real files/folders directly (css, js, images)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Everything else goes through the front controller
RewriteRule ^ index.php [L]
