That is how I prevented direct access from URL to my ini files. Paste the following code in .htaccess
file on root. (no need to create extra folder)
<Files ~ "\.ini$">
Order allow,deny
Deny from all
</Files>
my settings.ini
file is on the root, and without this code is accessible www.mydomain.com/settings.ini