This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10952|Reply: 0

[Bootstrap] bootstrap glyphicons-halflings-regular.woff2 file reports a 404 error

[Copy link]
Posted on 11/6/2015 6:41:26 PM | | | |


Today, I checked the source code of the website and found that there is a glyphicons-halflings-regular.woff file that was not found, because my website uses the Glyphicons font icon of bootstrap, so I need to load the related files of Glyphicons Halflings, but there is clearly this file in my file, so how can it report a 404 error?       So what is the specific reason, I think that there are other files in the same folder in the absolute path, why can't this be found? I found that the suffix of this file is .woff, is it because my server does not support this kind of file, and sure enough, I checked the information and found that my space is using Windows host, so I need to modify the configuration to make IIS support the access of this kind of file, just modify the web.config in the root directory of the website and add the following code



  1. <staticContent>
  2.       <remove fileExtension=".woff2"/>
  3.       <mimeMap fileExtension=".woff2" mimeType="application/font-woff"/>
  4.     </staticContent>
Copy code
After the above modifications, you can solve the problem of glyphicons-halflings-regular.woff font reporting 404 wrong notfound in bootstrap. As shown in the image below, there is no error in the 404




Previous:.net Read &amp; Split Parameters How to find the parameters you want
Next:【Hilarious Sharing】Several tragic moments in life
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com