简体   繁体   English

资源解释为Font但在Opencart中使用MIME类型text / html进行传输

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

I have seen a lot of answers in stackoverflow about this issue but none of them solve my issue. 我在stackoverflow中看到了很多关于这个问题的答案,但没有一个能解决我的问题。

I am using Opencart Store with custom typography and I see this error: 我正在使用自定义排版的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]". 资源解释为Font但使用MIME类型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]". 资源解释为Font但使用MIME类型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]". 资源解释为Font但使用MIME类型text / html传输:“[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.svg]”。

I have tried to add in the .htaccess 我试图添加.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

and other different possibilities I see in stackoverflow but I can't solve my problem without any of them. 和我在stackoverflow中看到的其他不同的可能性,但我无法解决我的问题,没有任何。

Also in the index of my homepage the slideshow is loading like a very slow loading (as internet in the past) as you can see here: 同样在我的主页索引中幻灯片加载就像一个非常慢的加载(如过去的互联网),你可以在这里看到:

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

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

And I don't know if is related with this issue. 我不知道是否与这个问题有关。

The website is: http://11maguen11.com 该网站是: http//11maguen11.com

I have had this problem myself and the solution is quite simple but hard to find :) 我自己有这个问题,解决方案很简单但很难找到:)

in catalog folder there is another .htaccess ( i presume you call the custom font from the theme ) you need to add the exceptions in that .htaccess file: 在目录文件夹中还有另一个.htaccess(我假设你从主题中调用自定义字体),你需要在.htaccess文件中添加例外:

It should be like this after you edit it 编辑后应该是这样的

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

And lastly there seems to be an encoding issue with your images, i do not know exactly where the problem might be, but it is certainly similar, maybe .jp is not in the rules above as it should be. 最后,您的图像似乎存在编码问题,我不确切地知道问题的确切位置,但它肯定是相似的,也许.jp不符合上述规则。

Hope i answered your questions :) 希望我回答你的问题:)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flask:资源被解释为样式表,但使用 MIME 类型 text/html 传输 - Flask: Resource interpreted as Stylesheet but transferred with MIME type text/html 资源被解释为样式表,但在 AngularJS 中使用 MIME 类型 text/html 传输 - Resource interpreted as Stylesheet but transferred with MIME type text/html in AngularJS 资源被解释为脚本,但以MIME类型text / html javascript传输 - Resource interpreted as Script but transferred with MIME type text/html javascript “资源被解释为脚本,但以MIME类型text / html传输”响应 - 'Resource interpreted as Script but transferred with MIME type text/html' response Firebase“资源解释为样式表,但使用 MIME 类型 text/html 传输” - Firebase "Resource interpreted as Stylesheet but transferred with MIME type text/html" Chrome说“资源解释为样式表,但使用MIME类型text / html传输” - Chrome says “Resource interpreted as Stylesheet but transferred with MIME type text/html” Rails&Heroku:资源被解释为脚本,但以MIME类型text / html传输 - Rails & Heroku: Resource interpreted as Script but transferred with MIME type text/html 资源被解释为样式表,但在 cloudflare 工作人员中使用 MIME 类型 text/html 传输 - Resource interpreted as Stylesheet but transferred with MIME type text/html in cloudflare workers Meteor Resource解释为样式表,但使用MIME类型text / html进行传输 - Meteor Resource interpreted as Stylesheet but transferred with MIME type text/html 资源被解释为脚本,但在单个站点上以MIME类型text / html传输 - Resource interpreted as Script but transferred with MIME type text/html on individual site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM