RewriteEngine On

# Allow direct access to existing files/folders
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Otherwise route everything through index.php
RewriteRule ^ index.php [QSA,L]
