# public/.htaccess RewriteEngine On # Redirect to HTTPS if not already (optional, if you want HTTPS only) # RewriteCond %{HTTPS} !=on # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # If the requested filename exists, serve it directly RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] # If the requested directory exists, serve it directly RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Otherwise, forward to index.php RewriteRule ^ index.php [L]