title: (htaccess) How to make a file only accessable by host Server and prevent direct access?
body: <p>I'm using Apache and lets say there is a file at "images/sample.jpg".</p>
  
  <ul>
  <li><p>With <strong>.htaccess</strong>, how can i make it <strong>appearing</strong> on the website and <strong>then prevent</strong> the direct access by url (<em>for example, direct url like "http://www.abc.com/images/sample.jpg"</em>) ?</p></li>
  <li><p>If possible, i also want the solution to affect on all sub-folders below the ".htaccess" file.</p></li>
  </ul>
  
  <p><br>
  <em>Additional Note:<br>
  After one day of getting below answers, i found all solutions logically work, but problem with Firefox. I mean, the below answers are giving the solution while testing on every browser but not with Firefox.</em></p>