Topic: htaccess: restrict direct access to a file, not a directoy

Hi,
I know how to restrict direct access to a directy, as well as password protected access to a single file.
But I don't know how to use RewriteEngine and RewriteCond so that it is used to restrict a single file not a directory. I'll appreciate any help.

Re: htaccess: restrict direct access to a file, not a directoy

to dny acces to a single file use something like this

<Files mysecret.file>
Deny From All
</Files>