title: Codeigniter echoing [::1] instead of localhost
body: <p>I am using CodeIgniter 3 as a web platform and trying to import semantic-UI CSS into my page. I'm doing so by using CodeIgniter's <code>base_url()</code> method in the <code>href</code> property for the CSS import.</p>
  <p>However, semantic.css itself imports some other fonts on my server, which cannot load because of <code>Cross-Origin</code> resource sharing policy. This is the error message chrome gives me:</p>
  <p>Font from origin '<code>http://[::1]</code>' has been blocked from loading by <code>Cross-Origin</code> Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.</p>
  <p>This is because base_url() echoes the domain has been <code>[::1]</code> and not localhost as I've typed into the browser.</p>
  <p>For some reason, it appears to me that chrome (and also Edge) does not consider <code>[::1]</code> and localhost as the same host, or maybe I'm just being dumb. What I know though is that if I change the path of the main semantic.css file and complex code localhost into it, it works, and it also works if, instead of requesting my page using localhost, I use <code>[::1]</code></p>
  <p>I've done other projects very similar to this and never had this <code>&quot;[::1]&quot;</code> appear. What exactly is causing PHP to echo such a path?</p>