PTED的字体,但在Opencart转移与MIME类型text / html资源跨$ P $ [英] Resource interpreted as Font but transferred with MIME type text/html in Opencart

查看:376
本文介绍了PTED的字体,但在Opencart转移与MIME类型text / html资源跨$ P $的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了很多答案在计算器关于这个问题,但他们没有解决我的问题。

我使用Opencart存储自定义排版,我看到这样的错误:

  

资源PTED的字体,但转用MIME类型text / html除$ P $:[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.woff] 。

     

资源跨preTED的字体,但使用MIME类型text / html转移: "[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.ttf]".

     

资源跨preTED的字体,但使用MIME类型text / html转移: "[http://www.11maguen11.com/catalog/view/theme/default/stylesheet/miller-textroman-webfont.svg]".

我试图在的.htaccess添加

 将AddType应用/ vnd.ms-fontobject .eot
将AddType字体/ TTF的.ttf
将AddType字体/ OTF .otf
将AddType应用/字体WOFF .woff
将AddType应用程序/ x-字体WOFF .woff
 

和其他不同的可能性我的计算器看到,但我解决不了我的问题,没有任何人。

在我的主页幻灯片加载是一个非常缓慢的加载(如互联网在过去的),你可以在这里看到的指数也

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

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

和我不知道是否与此问题相关的。

该网站是: http://11maguen11.com

解决方案

我有这个问题我自己解决的办法是很简单,但很难找到:)

在目录文件夹还有另外的.htaccess(我presume调用从主题自定义字体) 你需要添加例外的.htaccess文件:

这应该是这样的,你编辑后

 选项+了FollowSymLinks
RewriteEngine叙述上
的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 $
重写规则^(。+)$ /404.html [NC]

AddDefaultCharset UTF-8
 

和最后似乎有编码的问题与您的图像,我不知道到底是哪里出了问题可能是,但肯定是类似的,也许.JP不在上面,因为它应该是规则。

希望我回答你的问题:)

I have seen a lot of answers in stackoverflow about this issue but none of them solve my issue.

I am using Opencart Store with custom typography and I see this error:

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]".

I have tried to add in the .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.

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/slidemal2.jpg

And I don't know if is related with this issue.

The website is: 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:

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.

Hope i answered your questions :)

这篇关于PTED的字体,但在Opencart转移与MIME类型text / html资源跨$ P $的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆