簡體   English   中英

資源解釋為Font但在Opencart中使用MIME類型text / html進行傳輸

[英]Resource interpreted as Font but transferred with MIME type text/html in Opencart

我在stackoverflow中看到了很多關於這個問題的答案,但沒有一個能解決我的問題。

我正在使用自定義排版的Opencart商店,我看到這個錯誤:

資源解釋為Font但使用MIME類型text / html傳輸:“[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.woff]”。

資源解釋為Font但使用MIME類型text / html傳輸:“[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.ttf]”。

資源解釋為Font但使用MIME類型text / html傳輸:“[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.svg]”。

我試圖添加.htaccess

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/font-woff .woff  
AddType application/x-font-woff .woff

和我在stackoverflow中看到的其他不同的可能性,但我無法解決我的問題,沒有任何。

同樣在我的主頁索引中幻燈片加載就像一個非常慢的加載(如過去的互聯網),你可以在這里看到:

http://www.11maguen11.com/slidemal.jpg

http://www.11maguen11.com/slidemal2.jpg

我不知道是否與這個問題有關。

該網站是: http//11maguen11.com

我自己有這個問題,解決方案很簡單但很難找到:)

在目錄文件夾中還有另一個.htaccess(我假設你從主題中調用自定義字體),你需要在.htaccess文件中添加例外:

編輯后應該是這樣的

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !^(.+)\.jpg$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.jpeg$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.png$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.gif$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.css$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.js$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.woff$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.ttf$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.otf$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.svg$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.eot$
RewriteRule ^(.+)$ /404.html [NC]

AddDefaultCharset UTF-8

最后,您的圖像似乎存在編碼問題,我不確切地知道問題的確切位置,但它肯定是相似的,也許.jp不符合上述規則。

希望我回答你的問題:)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM