"Problem & Resolution" FONTS/FONTAWESOME-WEBFONT.WOFF2 404 (Not Found)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.