FontAwesome does not work for me when I put my app on IIS7 server.
In Firefox the requested URL is encoded to http://l2etest.kema.intra/fonts/fontawesome-webfo
SquishIt bundling tool for MVC3 was url-encoding the font paths, so ../fonts/fontawesome-webfont.eot?
in css file was changed to ../fonts/fontawesome-webfont.eot%3F
. This normally returns 400, because %3F is considered unsafe. If you set requestPathInvalidCharacters=""
then %3F is considered safe, but there is obviously no file ``../fonts/fontawesome-webfont.eot%3F`, therefore 404.
I removed fontawesome.css from the bundle and everything works fine.
for me only adding the bootstrap CDN link solved the issue
for your page:
<head>
...
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
...
</head>
Why is @font-face throwing a 404 error on woff files?
Add the MIME types in the web config:
<system.webServer>
<staticContent>
<remove fileExtension=".woff" /> <!-- In case IIS already has this mime type -->
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
</staticContent>
</system.webServer>
If you are using CodeIgniter under IIS7 :
In your web.config file, add woff to the pattern
<rule name="Rewrite CI Index">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="css|js|jpg|jpeg|png|gif|ico|htm|html|woff" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
Hope it helps !