2

A WordPress installation using http://www.example.com/blog shows a wrong font (and due to that a wrong layout) whereas using http://example.com/blog shows the correct font and layout.

This happens on Firefox and IE9. Chrome and IE8 do not behave like this.

I'm at a total loss about the possible causes for this, could you enlighten me?

5

Updated based on the comment provided by @Lèsemajesté

This happens because FF and IE9 have chosen to implement an anti-cross-domain DRM mechanism for web fonts.

I fixed it by using the following code in my htaccess file to pin the site to a single domain no matter which version of a url it's accessed from (this also seemed useful from an SEO point of view).

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.org.uk$ [NC]
RewriteRule ^(.*)$ http://www.domain.org.uk/$1 [R=301,L]

You can also workaround the problem by embedding the font in your style sheet using base64 encoding.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.