title: IIS7 Basic Authentication on PHP Site
body: <p>I have a PHP5 site running on IIS7 and I just wanted to add basic authentication on a subfolder called admin.</p>
  
  <p>I enabled both anonymous authentication and basic authentication and I just want to turn off anonymous authentication on the subfolder in order to force the basic authentication?</p>
  
  <p>Any suggestions?</p>
  
  <p>I tried adding a web.config in the subfolder with the following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;security&gt;
        &lt;authentication&gt;
          &lt;anonymousAuthentication enabled="false" /&gt;
        &lt;/authentication&gt;
      &lt;/security&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>