1

i have a index route:

/**
 * @Route("/", name="index")
 * @Template()
 */

It renders a twig template, which includes some css files like this:

<link rel="stylesheet" href="{{ 'bundles/public/css/bootstrap.min.css' }}" />

When i access the site like this:

app_dev.php

All is well, but when i redirect, or do

app_dev.php/

The css is not applied, and the files included are empty, its quite weird.

What could be the issue?

1 Answer 1

2

Using asset prior to the include in the twig template fixed it:

<link rel="stylesheet" href="{{ asset('bundles/public/css/bootstrap.min.css') }}" />
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.