RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !/api/custom/dtt/getComunicazioni.php [NC] RewriteCond %{REQUEST_URI} !/api/custom/dtt/putProtocollo.php [NC] RewriteRule ^(.*)$ index.php/ [L,R=403]