I am trying to use Font Awesome in my project. I modified the font-awesome.css to point to my directory where the font files are stored. So now it looks like this:
src: url('fontawesome-webfont.eot?v=3.2.1');
src: url('fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), url('fontawesome-webfont.woff?v=3.2.1') format('woff'), url('fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
But the problem is that it throws error on my browser console for the statement url('fontawesome-webfont.woff?v=3.2.1')
. The error is:
GET http://localhost/***/***/fontawesome-webfont.woff?v=3.2.1 400 (Bad Request) fontawesome-webfont.woff?v=3.2.1:1
GET http://localhost/***/***/fontawesome-webfont.ttf?v=3.2.1 400 (Bad Request) fontawesome-webfont.ttf?v=3.2.1:1
If I modify the statement to url('fontawesome-webfont.woff')
then it works without any error. I found this question on StackOverflow where user has same problem but no satisfactory answers are provided.
Anyone knows the reason for this? Also why are the additional parameters in font's URL provided for like fontawesome-webfont.eot?#iefix&v=3.2.1
and fontawesome-webfont.svg#fontawesomeregular?v=3.2.1
?
I had nearly the same problem: the only fontawesome-webfont.woff?=3.2.1
gives the error but another woff without version is loading with no problem and ttf with 3.2.1 was loaded with no problem.
I have added MIME
type woff as font/woff
to the application's MIME
types.
Getting 200 now.
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With