title: Disable Access-Control-Allow-Origin from apache or htaccess
body: <p>In my local machine when I try to send a request via ajax using cross domain the request doesn't complete. I added this options to my .htaccess file:</p>
  
  <pre><code>Header always set Access-Control-Allow-Origin "https://accepted-domain"
  Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
  Header always set Access-Control-Max-Age "1000"
  Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
  
  RewriteEngine On
  RewriteCond %{REQUEST_METHOD} OPTIONS
  RewriteRule ^(.*)$ $1 [R=200,L] 
  </code></pre>
  
  <p>After that, everything worked just fine but when I uploaded this to my cPanel server the request didn't complete. 
  However, if I remove these lines from the .htaccess file everything works just fine.</p>
  
  <p><strong>The question is:</strong> How to disable this Access-Control-Allow-Origin in my cPanel host to define it with the domain I want to accept only ?</p>
  
  <p><strong>UPDATED</strong>
  When I sent the request on my cPanel hosting the response was this message:</p>
  
  <pre><code>Failed to load http://receiver-domain.com/create.php: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Origin 'http://sender-domain.com' is therefore not allowed access.
  </code></pre>
  
  <p>Which means the Access-Control-Allow-Origin has been set somewhere else.</p>