Recently, several WordPress sites from the company moved from AWS to Windows and tossed for a while. A new problem was released today, and the woff font on the website was reported to be 404. After confirming that the file has been uploaded to the correct path, think back to the problem that the font file could not be found in the IIS environment encountered before. It feels that there is no reason to add the MIME type to the font file. Windows Azure is not a virtual host, so it won't give me an IIS for me to configure. I can only think of other ways.
Fortunately, a web.config file was found in the root directory of the website. This is supposed to be the configuration file for the ASP.NET application. Although WordPress uses the PHP language, the management of file types should not involve the scope of the language of the website, as long as the server environment is properly configured.
Open web.config, which is an XML file that already has a MIME type information for the svg file, much like what was previously configured in IIS:
<mimeMap fileExtension= ".svg" mimeType="image/svg+xml"/>Before IIS, the MIME type settings for several font files are as follows:
These two are added to the web.config:
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /><mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" /> The tag structure for MIME types in the entire file should look like this:
<?xml version="1.0" encoding=" UTF-8"?><configuration> <system.webServer> <staticContent> <mimeMap fileExtension=".svg" mimeType="image/svg+xml"/> <mimeMap fileExtension=" ;.woff" mimeType="application/x-font-woff" /> <mimeMap fileExtension =".woff2" mimeType="application/x-font-woff" &> </staticContent> <rewrite>...</rewrite> </system.webServer></configuration> After the completion of the refresh the page, woff and other fonts can be loaded smoothly, IIS6 settings, please refer to how to make IIS6 support svg image display
Image password is a new way to help users protect their touches on Win8 computers. Users can choose
Win10 will be officially launched this summer. From last year to now, Microsoft has released a lot o
Is there any failure to switch the input method by pressing the <quo;ctrl”plus<quo;shift&r
In fact, after the win7 system has been used for a long time, netizens have such troubles, that is,
What should I do if the scanning software that comes with the windows system cannot scan?
How to take screenshots of windows8? Win8 desktop full screen screenshot graphic tutorial
How to modify the Win10 "File Explorer" target to point to
When is the official version of Windows 10 released? 99% will be released in July
How to use Win7's own screenshot tool
Microsoft anger brush version number! Win10 Build version number 14381/14382/14383 exposure
Win10 how to remove the English (US) American keyboard province back and forth switching
Win7 add my computer to the taskbar method
Windows7 system online to get more gadgets graphic tutorial
How to continue to upgrade after the power outage of Win10 TH2 official version upgrade?
Win8.1 computer to play large game card screen how to solve
What should I do if the Insider setting item is not available in Win10 RS2 Preview 14905?
Win 8 system to achieve F8 into safe mode
MSN automatic offline solution in Microsoft Windows 7
How does Win10 remove the OneDrive icon in the navigation pane?
52 English words and abbreviations you need to know to play Windows 7 system
How to stop Win7 webpage from turning on the camera and microphone?
Missing system files do not need to be reinstalled into Vista system