You can disable public access to a directory using the .htaccess
RewriteEngine On
RewriteRule ^(?:images)\b.* index.php/$0 [L]
This would forward requests to the images folder to your index.php
file.
This will only work if you have mod_rewrite
enabled.
Also you could add a .htaccess
file to the folder you would like to disable public access to and add the following rule.
deny from all