RewriteEngine On # Let the front controller handle everything except itself RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/api/index.php RewriteRule ^(.*)$ index.php [QSA,L]