1

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 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.