1RewriteEngine On 2 3RewriteCond %{REQUEST_FILENAME} !-f 4RewriteCond %{REQUEST_FILENAME} !-d 5RewriteRule ^(.*)$ api.php?host=$1 [QSA,L] 6