title: Codeigniter CORS policy: No 'Access-Control-Allow-Origin' error How to resolve?
body: <p>Error:
  Access to Font at '<a href="http://www.example.com//assets/global/plugins/font-awesome/fonts/fontawesome-webfont.woff2?v=4.4.0" rel="noreferrer">http://www.example.com//assets/global/plugins/font-awesome/fonts/fontawesome-webfont.woff2?v=4.4.0</a>' from origin '<a href="http://example.com" rel="noreferrer">http://example.com</a>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://example.com" rel="noreferrer">http://example.com</a>' is therefore not allowed access.</p>
  
  <p>Solution:</p>
  
  <pre><code>&lt;?php
  header('Access-Control-Allow-Origin: *');
  
  class Home extends CI_Controller {
      public function index()
      {
          $this-&gt;load-&gt;view('master');
      }
  }
  ?&gt;
  </code></pre>
  
  <p>I tried this Solution but it not working can you please help me How to resolve it? and How to remove index.php from URL?</p>