2014-03-27 51 views
3

我在這個問題的stackoverflow中看到了很多答案,但它們都不能解決我的問題。Resource解釋爲字體,但在Opencart中以MIME類型text/html傳輸

我使用Opencart的商店定製排版和我看到這個錯誤:

Resource interpreted as Font but transferred with MIME type text/html: "[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.woff]".

Resource interpreted as Font but transferred with MIME type text/html: "[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.ttf]".

Resource interpreted as Font but transferred with MIME type 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 

等不同的可能性我在計算器看到,但沒有他們,我無法解決我的問題。

在我的主頁幻燈片加載是一個非常緩慢的加載(如在過去的互聯網),你可以在這裏看到的指數

另外:

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

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

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

的網址是:http://11maguen11.com

回答

1

我有這個問題我自己解決的辦法是很簡單,但很難找到:)

在目錄文件夾還有另外的.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不在上面的規則,因爲它應該是。

希望我回答你的問題:)

+0

太棒了!那麼我沒有看到目錄文件夾中的任何htaccess,但我已經創建了一個新的與你給我的信息,現在我沒有看到這個錯誤。非常感謝。幻燈片的問題,我真的不知道哪裏可能是問題,但我認爲必須是任何js衝突,但我沒有看到任何錯誤日誌中,只有終止;幻燈片太少:在Chrome控制檯中有1個。 – MZBS

相關問題