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
- <staticContent>
- <remove fileExtension=".woff2"/>
- <mimeMap fileExtension=".woff2" mimeType="application/font-woff"/>
- </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
|