{"id":103397,"date":"2017-05-31T14:43:17","date_gmt":"2017-05-31T12:43:17","guid":{"rendered":"https:\/\/nl.wordpress.org\/support\/topic\/custom-lettertypes-worden-niet-geladen-bad-uri-or-cross-site-access-not-allowed-2\/"},"modified":"2017-05-31T14:49:09","modified_gmt":"2017-05-31T12:49:09","slug":"custom-lettertypes-worden-niet-geladen-bad-uri-or-cross-site-access-not-allowed-2","status":"publish","type":"topic","link":"https:\/\/nl.wordpress.org\/support\/topic\/custom-lettertypes-worden-niet-geladen-bad-uri-or-cross-site-access-not-allowed-2\/","title":{"rendered":"Custom lettertypes worden niet geladen -bad URI or cross-site access not allowed"},"content":{"rendered":"<p>Ik heb een wordpress website via duplicator overgezet naar een andere host zonder problemen.<br \/>\nVolgende morgen ontdekken we dat sommige icoontjes (speciaal lettertype) niet willen inladen.<\/p>\n<p>In de console krijg ik deze meldingen<\/p>\n<pre><code>\ndownloadable font: download failed (font-family: &quot;ETmodules&quot; style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: http:\/\/daltix.com\/wp-content\/themes\/Divi-3\/core\/admin\/fonts\/modules.ttf  style.css:6058:12\n\ndownloadable font: download failed (font-family: &quot;ETmonarch&quot; style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: http:\/\/daltix.com\/wp-content\/plugins\/monarch\/css\/fonts\/monarch.ttf  style.css:59:12\n\ndownloadable font: download failed (font-family: &quot;ETmodules&quot; style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: http:\/\/daltix.com\/wp-content\/themes\/Divi-3\/core\/admin\/fonts\/modules.woff  style.css:6058:12\n\ndownloadable font: download failed (font-family: &quot;ETmonarch&quot; style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: http:\/\/daltix.com\/wp-content\/plugins\/monarch\/css\/fonts\/monarch.woff\n<\/code><\/pre>\n<p>(lettertypes staan op de host)<br \/>\nNa enkele uren googlen dacht ik een oplossing gevonden te hebben :<br \/>\nonderstaande code in de .htaccess schrijven<\/p>\n<pre><code>\n&lt;IfModule mod_headers.c&gt;\n&lt;FilesMatch &quot;\\.(eot|font.css|otf|ttc|ttf|woff)$&quot;&gt;\n    Header set Access-Control-Allow-Origin &quot;*&quot;\n&lt;\/FilesMatch&gt;\n&lt;\/IfModule&gt;\n&lt;IfModule mod_mime.c&gt;\n# Web fonts\nAddType application\/font-woff woff\nAddType application\/vnd.ms-fontobject eot\n\n# Browsers usually ignore the font MIME types and sniff the content,\n# however, Chrome shows a warning if other MIME types are used for the\n# following fonts.\nAddType application\/x-font-ttf ttc ttf\nAddType font\/opentype otf\n\n&lt;\/IfModule&gt;\n\n# rewrite www.example.com \u2192 example.com\n\n&lt;IfModule mod_rewrite.c&gt;\nRewriteCond %{HTTPS} !=on\nRewriteCond %{HTTP_HOST} ^www\\.(.+)$ [NC]\nRewriteRule ^ http:\/\/%1%{REQUEST_URI} [R=301,L]\n&lt;\/IfModule&gt;\n<\/code><\/pre>\n<p>Het leek perfect te werken, tot ik de subpagina&#8217;s bekeek. Nu hadden deze geen icoontjes meer. Terwijl ze zonder de &#8216;oplossing&#8217; wel te zien zijn op subpagina&#8217;s.<\/p>\n<p>Na een beetje experimenteren ondervond ik dat het onderste gedeelte van de &#8216;oplossing&#8217; de switch maakt tussen <\/p>\n<p><em>-GEEN icoontjes op Homepagina -&gt; WEL op subpaginas<\/em><br \/>\nof<br \/>\n<em>-WEL icoontjes op Homepagina -&gt; GEEN op subpaginas<\/em><\/p>\n<p>Edit: ik kon niet inloggen op wp-admin, zonder het onderste gedeelte lukt het wel<\/p>\n<p>Enige gedachten?<\/p>\n","protected":false},"template":"","class_list":["post-103397","topic","type-topic","status-publish","hentry","topic-tag-bad-uri-or-cross-site-access-not-allowed","topic-tag-custom-lettertype-niet-geladen"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/103397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/103397\/revisions"}],"predecessor-version":[{"id":103398,"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/103397\/revisions\/103398"}],"wp:attachment":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=103397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}