How to deny the web access to some files?
Solution 1:
You could use Files/FilesMatch and a regular expression:
<Files ~ "\.txt$">
Order allow,deny
Deny from all
</Files>
This is how .htpasswd is protected.
or redirect any access of .txt to a 404:
RedirectMatch 404 \.txt$
Solution 2:
From the Order documentation section:
Keywords may only be separated by a comma; no whitespace is allowed between them.
So the following is incorrect:
<Files File.txt>
Order allow, deny
Deny from all
</ Files>
The following is (more) correct
<Files "File.txt">
Order allow,deny
Deny from all
</Files>