Wednesday, March 29, 2017

laravel 5.3 returning notfoundexception when trying to load a woff / ttf file from public directory

trying to access

http://dev.causepick.org/caup_api/css/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0

return

NotFoundHttpException in RouteCollection.php line 161:

accessing

http://dev.causepick.org/caup_api/css/font-awesome/fonts/fontawesome-webfont.css?v=4.7.0

returns 404. 404 is expected, as the file is not a CSS file. but notfoundhttpexception is not

why is that and why cannot I load fonts via public folder?

lets make it clear:

the font file is there

not found http exception is only expected for proper routes, not for files in the public folder. It seems that .woff is not trying to reach a file in the public folder. Is it an nginx config problem?



via Toskan

Advertisement