i have a directory on the path

http://site.com/dir

in this dir, i have few files that i do not want anyone to access directly by entering the URL in the browser.

like

http://site.com/dir/file.cer
http://site.com/dir/file.pem
http://site.com/conf.conf

something like these files.

i can not move these files behind the webroot due to some reasons.

So please help me what should i write in my htaccess to achieve this?