I have the same problem as the guy who asked this question but since i use symfony 4, it can't be because of not specifying the bundle.
At first, i was trying to load a css file in my template without assetic, using :
<link rel="stylesheet" href="/css/layer.css" />
I thought it was enought since that's what the documentation says, but the css is not loading and i have an html file (not actually displayed) instead.
The html file is a symfony error page saying :
No route found for "GET /css/layer.css"
At first i thought it may be a domain error, so i specified it :
<link rel="stylesheet" href="http://localhost:8000/css/layer.css" />
but nothing changed.
I also tried to load the css with assetic, using :
<link rel="stylesheet" href="{{ asset('css/layer.css') }}" />
but i got the exact same error. (assetic builded the same route)
The file is : /css/layer.css
.
I don't know what i'm doing wrong. Can you help ?