title: htaccess: file access for specific ip only
body: <p>i have create custom form for user to submit the documents. now i want to restrict the access of that folder for others.. only specific ip can view the documents only.</p>
  
  <p>for example:    <strong>docs</strong>  folder contains some images, pdf, and docx files. now i am restricting access for pdf and docx file using .htaccess code .</p>
  
  <p>now as i have restrict the file access directly , the browser is returning <strong>403 error.</strong></p>
  
  <p>now what i need is only my ip  can access  the pdf and docx.</p>
  
  <p>for example:  my ip is 100.100.100.100 so only i can access the pdf and docx file  directly not others.</p>
  
  <pre><code>             is there .htaccess code to allow file access for specific ip?
  </code></pre>
  
  <p>i did try this code.. which block access for my ip as well </p>
  
  <pre><code>                Order deny,allow
                 Deny from all
                   &lt;Files ~ ".(xml|css|jpe?g|png|gif|js)$"&gt;
                   Allow from all
                  &lt;/Files&gt;
  
                  &lt;Files ~ ".(xml|css|jpe?g|png|gif|js)$"&gt;
                   Allow from 100.100.100.100
                  &lt;/Files&gt;
  </code></pre>