mimeMap仍然不显示我的SVG [英] mimeMap still does not display my svg
问题描述
我很抱歉,如果选择的是新手还是愚蠢,但这是一个使用web.config文件我的第一次。
I am sorry if it is something novice or silly but this is my first time using a web.config file.
我一直在处理的快感GoDaddy的的默认情况下不提供 SVG
支持。所以,我发现使用的web.config
文件通知浏览器如何处理该文件类型的一些信息。
I have been dealing with the pleasure of godaddy not provide svg
support by default. So I found some info on using a web.config
file to inform the browser what to do with this file type.
来源
我能够获得服务器上的文件没有崩溃的一切。该网站仍会显示,而不是显示一个 500(内部)误差
但 SVG
还是什么都不做。
I am able to get the file in the server without crashing everything. The website will still display instead of displaying a 500 (internal) error
but the svg
still does nothing.
下面是我的web.config文件:
Here is my web.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="images/svg+xml" />
<remove fileExtension=".svgz" />
<mimeMap fileExtension=".svgz" mimeType="images/svg+xml" />
</staticContent>
</system.webServer>
</configuration>
有谁知道我做错了什么?我也把文件放到服务器,但没有运气的主根文件。
Does anyone know what I am doing wrong? I also put the file into the main root file on the server but no luck.
直播现场,如果有帮助:移动应用设计
Live site if it helps: Mobile app design
推荐答案
看来你的mime类型不正确。从图片去掉的
:
It appears your mimeType is incorrect. Remove the "s" from the images
:
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<一个href=\"http://www.iis.net/learn/manage/managing-your-configuration-settings/adding-ie-9-mime-types-to-iis\"相对=nofollow>参考,如果你喜欢的文件
这篇关于mimeMap仍然不显示我的SVG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!