Forum Moderators: phranque
The simplest soultion is to just delete the file!
The second simplest is to change the rights of the file so no one can see it.
chmod 0 secretfile.html
It can be done with htaccess but if the above methods are what you are looking for then try them first.
You can use <Files ...> directive and deny from all.
<Files "sample.html">
deny from all
</Files>
You can use RewriteRule.
RewriteRngine on
RewriteRule ^example.html$ - [F]
You can set the permission to 600 (this works on most servers).
You can rename files.
You can move files to another directory without public access.