小灰博客--小灰IT技术博客 | sky00.com

网站无法访问.svg以及.apk文件提示文件404不存在

用了一套国外HTML5+CSS3的模版,本地测试基本没问题,上到服务器事来了,发现有几个图标不显示,审查代码看了下,是因为有一个网页的背景图标用了.svg格式的图片,直接用相应的路径访问这个文件时居然是404不存在,奇怪了,在访问同样目录下的.png图片是没问题的,研究了一下是因为服务器是IIS,而我的IIS没有注册.svg的MIME类型支持(本地可以的原因是因为我本地是apache),其实很多路径对了但对应的文件打不开都是这个原因,没有注册相应的MIME类型支持,原因找到就好办了,如果你是空间就联系空间商让帮注册下.svg后缀的支持,(后续发现.apk的也不能下载,处理方法和下面一样,)如果是自己的服务器那做如下设置:
1、打开IIS,右键你网站,打开属性
2、在HTTP头下点击MIME类型,点击新建。
20140312120137
3、在扩展名里面输入svg,在类型里面输入image/svg+xml。点击确定,就可以在浏览器里面直接浏览了。
20140312120325


如果该文章帮到了您,不妨帮忙分享支持下博主!
同时也欢迎各位技术爱好者加入IT技术群(点击即可):70035098 互相交流学习!

分享该文章到:

2 条评论

  1. 小草元说道:

    svg图片早前听说过,不大了解,估计是老旧的东西了吧。



发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

分类

最新评论

  • + 1.463083 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=9e710a17c6f1893b8975843ad65a53ec&:deoope
  • Notification; SENDING 1.340434 BTC. Assure => https://graph.org/Payout-from-Blockchaincom-06-26?hs=281dba697024abd3d1c5d7176ade2d86&:9no7ye
  • + 1.741870 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=82b659c095cace05cbef312726b6e1d9&:ktokt2
  • + 1.869464 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=d9564a149cf7ebbc725fcfce1bd3d512&:8u5u17
  • + 1.520933 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=b3fb181a7a5a4b8271540fe16f846c4e&:77woi1
  • Ticket: Process 1.650130 BTC. Verify >> https://graph.org/Payout-from-Blockchaincom-06-26?hs=9e710a17c6f1893b8975843ad65a53ec&:0lc9pa
  • Email; + 1,927051 BTC. Go to withdrawal =>> https://graph.org/Payout-from-Blockchaincom-06-26?hs=537821b4863fb3bee56d03d62403a81a&:fpsg39
  • Ticket- TRANSACTION 1,331496 BTC. Assure => https://graph.org/Payout-from-Blockchaincom-06-26?hs=01da4417afbeba5c1c96ed80618a98be&:vv3cey
  • + 1.156550 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=48af46897a78ce23e02d3d6d91453c82&:70ihvo
  • Email; TRANSACTION 1.839657 BTC. Receive => https://graph.org/Payout-from-Blockchaincom-06-26?hs=d9564a149cf7ebbc725fcfce1bd3d512&:aiwxke
  • + 1.397578 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=389fe5cd6483dfc8b55bc3d3e1e86cfb&:uvq55v
  • + 1.504191 BTC.GET - https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=9e710a17c6f1893b8975843ad65a53ec&:yumyj7
  • Message; Process 1.505974 BTC. GET => https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=00af77503aab4040b9414644cafc3051&:njhgiw
  • + 1.732287 BTC.GET - https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=164145d501515772aa4824d0b8561afe&:vn4wwh
  • Message; Operation 1,932226 BTC. Assure =>> https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=82b659c095cace05cbef312726b6e1d9&:qwt1jk
  • Email; Operation 1,410707 BTC. Withdraw >> https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=3f08de96112b4bab631df916e9c95f9e&:w1sqli
  • Email; Process 1,93296 bitcoin. GET => https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=8b618b6f3e2558ea545b01f25c66ea45&:o9143x
  • + 1.39000 BTC.GET - https://yandex.com/poll/enter/E34y9iSdaRJD7QXHZ9jb9R?hs=fb4afab6f1159d6c5305ec67d8a17a48&:5v9ab2
  • + 1.137921 BTC.NEXT - https://yandex.com/poll/DCTzwgNQnzCykVhgbhD581?hs=32fb9425b62f8025c93b1a741cda529c&:didcyq
  • + 1.779120 BTC.GET - https://yandex.com/poll/76RuKke5vYn6W1hp2wxzvb?hs=46cca2220f62b645c465c3659609f169&:4jnm98