RewriteEngine On

# Ensure the request is not for an existing file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Route the request to index.php
RewriteRule ^ index.php [QSA,L]