Symfony routing component not loading assets

295 Views Asked by At

I am building my own framework with Symfony components, and am having trouble loading assets into my Twig templates. The problem seems to be in the routing component not finding routes for my assets (.css, js, etc). Do I really have to build routes for this? I'm assuming there's a mechanism out there for handling such a situation. Just now sure what it is. Note: I am using components, not the full framework. I have set up Twig-Bridge, with the Asset Extension, etc. Urls are being generated in the template correctly, but when the asset is requested from the server (my app) responds with 500 - route not found.

1

There are 1 best solutions below

0
On

A night of sleep helps. Turns out the issue was on my web server. I had a redirect rule sending all requests to the index.php. Created a rule for asset-type docs to serve the files directly, not via the application.