Problem:
Although the webpage is displaying and running normally, there are 404 errors in 2 font files. Like the author of this obsessive-compulsive disorder is not acceptable.
Solve:
Because the author's server is a virtual host, only need to add the corresponding MIME type on the host controller platform.
This allows the server to support both font files without error.
Refer to the full text of the solution article as follows:
Source: http://www.yneit.com/2016/06/fontsfontawesome-webfont-woff2-404-not-found.html
The first time you use Fontawesome to load fonts, but when using the prompt fonts/fontawesome-webfont.woff2 404 (not Found), it is obvious that this is due to the problem of the file does not exist. Then let's take a look at the details:
There are two possible scenarios:
1, the project release process this file has not been copied to the publishing directory, I encountered this problem is caused by this, in the project grunt build will be a copy of the file, the file suffix is limited, so I only need to add this. woff2;
2, because the Web server does not support the resulting:
Nginx does not support the situation, you can refer to the following configuration to resolve:
Location ~* \. (eot|otf|ttf|woff|woff2| svg) $ {add_header Access-control-allow-origin *;} AddType application/x-font-woff woffaddtype application/x-font-woff2 woff2
Apache is not supported by default. Woff and. Woff2, so to set up a bit:
Location ~* \. (eot|otf|ttf|woff|woff2| svg) $ {add_header Access-control-allow-origin *;} AddType application/x-font-woff woffaddtype application/x-font-woff2 woff2
IIS is not supported by default and can be added with MIME types to resolve:
. WOFF2 Application/x-font-woff
"Problem & Resolution" FONTS/FONTAWESOME-WEBFONT.WOFF2 404 (Not Found)