I'm trying to use the glyphicons provided by Bootstrap 3.3.6 but Chrome is blocking the access to them with this error message:
Font from origin 'http://[::1]' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
This is my .htaccess
:
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
What am I doing wrong? Am I editing the wrong .htaccess
?
I also tried adding header("Access-Control-Allow-Origin: *");
at the beginning of my header.php
file but that didn't work either. I'm out of ideas.
The folder structure is like this:
application
controller
model
view
header.php
index.php
footer.php
.htaccess
system
assets
css
fonts
images
js