RewriteEngine On Options -Indexes RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php?api=$1 [QSA,L]
info at phpclasses dot org