Options -Indexes order deny,allow deny from all deny from all RewriteEngine On RewriteCond $1 !^(api|asset) RewriteRule ^(\d+|\w+)$ index.php?id=$1