Mobile app version of vmapp.org
Login or Join
Radia820

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

@Radia820

Posted in: #Fonts #Layout #NoWww #Wordpress

A WordPress installation using www.example.com/blog shows a wrong font (and due to that a wrong layout) whereas using 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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Radia820

1 Comments

Sorted by latest first Latest Oldest Best

 

@Voss4911412

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 ^(.*)$ www.domain.org.uk/ [R=301,L]


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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme