Introduction
In some cases, you may find that dot (.) files on your server are accessible via URL like so:
domain.com/.file
Procedure
While their may be several potential ways to block access to such files, one way is to use rewrite rules in the an .htaccess file as follows:
RewriteRule (^\.|/\.) - [R=406,L]