Problem
If i access my site via www.domain.tld
the @font-face
rule is omited.
If i go to domain.tld
(without the 'www' part) @font-face
is regarded.
All other css formattings are working in both cases fine.
CSS
@font-face {
font-family: 'font-name';
src: url(../fonts/font-name.eot);
src: local("font-name"), url(../fonts/font-name.ttf) format("truetype");
}
Django
In my Django settings.py
:
STATIC_ROOT = '/var/www/domain.tld/static/'
STATIC_URL = 'http://domain.tld/static/'
If i change it to STATIC_URL = 'http://www.domain.tld/static/'
the @font-face
rule is omited on domain.tld
and regarded on www.domain.tld
so it's the reverse behavior.
Apache
<VirtualHost *:80>
CustomLog /var/log/apache2/domain.tld.log combined
ServerName domain.tld
ServerAlias www.domain.tld
WSGIScriptAlias / /var/www/domain.tld/wsgi
Alias /static/ /var/www/domain.tld/static/
Alias /robots.txt /var/www/domain.tld/static/robots.txt
Alias /favicon.ico /var/www/domain.tld/static/img/favicon.ico
</VirtualHost>