<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # If the request is for a real file or directory, serve it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # Otherwise, route everything to index.php
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>