title: multiple .htaccess file add Access-Control-Allow-Origin
body: <p>I have two .htaccess file. One is in the root and the second one is in subfolder. At root I set the Access-Control-Allow-Origin like this:</p>
  
  <pre><code>Header add Access-Control-Allow-Origin "http://mypage.de" 
  Header add Access-Control-Allow-Origin "http://www.mypage.de"
  </code></pre>
  
  <p>The subfolder is the target of a subdomain and I just want to set the Access-Control-Allow-Origin to both variants of the subdomain like this:</p>
  
  <pre><code>Header add Access-Control-Allow-Origin "http://sub.mypage.de" 
  Header add Access-Control-Allow-Origin "http://www.sub.mypage.de"
  </code></pre>
  
  <p>The problem is that I get on my subdomain a 400 bad request error because the 2 definitions from my root are also added to the request when calling the subdomain. Is there a way to reset Access-Control-Allow-Origin or to exclude the subfolder from using the header rules from the root htaccess? Thanks.</p>