RewriteEngine On RewriteBase /api/ RewriteRule ^core/index\.php$ - [L] RewriteRule ^(.*)$ core/index.php [QSA,L]