I want to disable access to any file OR directory, whose name begins with a DOT. I came up with the following, but it disables access to files/directories beginning with DOT onl
This works perfectly for me (Apache 2.4):
Require all denied
Denies any URL that contains a component beginning with a dot (file or directory).