Search code examples
.htaccessfirefoxfont-face

Font embedding and .htaccess in Firefox


Check out http://fube.ca in any browser but Firefox and you'll see that the cloud logo is a custom glyph font. In Firefox, though, the font won't load.

As best I can gather, the problem is that I'm serving the font from a subdomain and Firefox has strict requirements about the serving fonts from the exact same domain as the site. Apparently I can get around this by making a change to my .htaccess file, but the recommended changes don't seem to be working. See https://www.fontspring.com/support/troubleshooting/webfonts-are-not-loading-in-firefox and http://enable-cors.org.

Based on what I gather from these, here is what my .htaccess file currently looks like:

AddHandler php-stable .php

Header set Access-Control-Allow-Origin "*"

The first line was already there. I added the second (blank) and third lines. What am I doing wrong?


Solution

  • Actually, it turns out that my changes to .htaccess didn't save somehow. Adding that line to .htaccess does fix the problem.