title: enable cors in .htaccess
body: <p>I have created a basic RESTful service with the SLIM PHP framework and now I'm trying to wire it up so that I can access the service from an Angular.js project. I have read that Angular supports CORS out of the box and all I needed to do was add this line: <code>Header set Access-Control-Allow-Origin "*"</code> to my .htaccess file. </p>
  
  <p>I've done this and my REST application is still working (no 500 internal server error from a bad .htaccess) but when I try to test it from <a href="http://test-cors.org">test-cors.org</a> it is throwing an error.</p>
  
  <pre><code>Fired XHR event: loadstart
  Fired XHR event: readystatechange
  Fired XHR event: error
  
  XHR status: 0
  XHR status text: 
  Fired XHR event: loadend
  </code></pre>
  
  <p>My .htaccess file looks like this</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ /index.php [QSA,L]
  Header set Access-Control-Allow-Origin "*"
  Header set Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
  </code></pre>
  
  <p>Is there something else I need to add to my .htaccess to get this to work properly or is there another way to enable CORS on my server?</p>