title: How secure is htaccess deny from all
body: <p>I have a file that I don't want to be accessed by anyone except my own server (by php request). I am using the following in my .htaccess:</p>
  
  <pre><code>&lt;Files myfile.xml&gt;
      Order Deny,Allow
      Deny from all
      Allow from localhost
  &lt;/Files&gt;
  </code></pre>
  
  <p>But was wondering, how secure is this? Is there anyway that someone might be able to get around this and get to the file directly?
  In my php file I have:</p>
  
  <pre><code>simplexml_load_file("myfile.xml")
  </code></pre>
  
  <p>To get the data and also am using</p>
  
  <pre><code>if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) &amp;&amp; strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
  </code></pre>
  
  <p>So no one can access that file directly (only by Ajax)
  What do you guys think about using this method?</p>