title: Limit GET/POST not working in .htaccess
body: <p>i have some files as shown below</p>
  
  <pre><code>  |.htaccess
    |-index.php
    |-subfolder
         |--.htaccess
  </code></pre>
  
  <p>one <code>.htaccess</code> file is in root folder,another <code>.htaccess</code> file is in one subfolder</p>
  
  <p>The root's <code>.htaccess</code> have this below code</p>
  
  <pre><code>&lt;If "%{HTTP_HOST} == 'abc.web.com'"&gt;
  php_value auto_prepend_file "/var/www/vhosts/abc.web.com/common.php"
  &lt;/If&gt;
  &lt;Else&gt;
  php_value auto_prepend_file "/var/www/vhosts/def.web.com/common.php"    
  &lt;/Else&gt;
  </code></pre>
  
  <p>and subfolder's <code>.htaccess</code> file having the below code</p>
  
  <pre><code>AuthUserFile /var/www/vhosts/abc.web.com/.htpasswd
  AuthGroupFile /dev/null 
  AuthName "Password Protected Area"
  AuthType Basic
  &lt;Limit GET&gt;
   require valid-user
  &lt;/Limit&gt;
  </code></pre>
  
  <p>Now the problem is <code>&lt;Limit GET&gt;</code> block is working only after commenting out the <code>If else</code> block in the root's <code>.htaccess</code> file.</p>
  
  <p>if the <code>if else</code> code block is present in the root's .htaccess file then the <code>Limit get</code> code block in the subfolder's .htaccess file is not working.</p>
  
  <p>Any idea why its behaving like this !</p>
  
  <p><strong>Edit - 1:</strong></p>
  
  <p>Even if i comment out the code in <code>If</code> and <code>Else</code> blocks of root's <code>.htaccess</code> file still the <code>Limit</code> thing is not working in subfolder's <code>.htaccess</code></p>
  
  <blockquote>
    <p>Root's <code>.htaccess</code></p>
  </blockquote>
  
  <pre><code>&lt;If "%{HTTP_HOST} == 'abc.web.com'"&gt;
  #php_value auto_prepend_file "/var/www/vhosts/abc.web.com/common.php"
  &lt;/If&gt;
  &lt;Else&gt;
  #php_value auto_prepend_file "/var/www/vhosts/def.web.com/common.php"    
  &lt;/Else&gt;
  </code></pre>
  
  <p>The <code>Limit</code> in sub folder's <code>htaccess</code> only working if i completely comment out/remove the total <code>If</code> <code>Else</code> blocks of root <code>.htaccess</code> !!</p>
  
  <p>Why is this dependency between both <code>.htaccess</code> files !</p>