RewriteEngine On RewriteRule ^api/(.*)$ index.php/api/$1 RedirectMatch 403 ^/private/.*$