ReynierPM
ReynierPM

Reputation: 18660

From development (app_dev.php) to production (app.php) in Symfony2

I'm working in a Symfony2 project, under development enviroment app_dev.php all works fine but when I go to production app.php I get this error at Firebug console:

"NetworkError: 404 Not Found - http://applicationtest.com/css/fmain.css"

And of course CSS and JS isn't working, what I miss?

Upvotes: 0

Views: 741

Answers (2)

Jovan Perovic
Jovan Perovic

Reputation: 20191

It seems that you have not dumped assetic resources:

php app/console assetic:dump --env=prod

And then try again...

Upvotes: 2

fidelio
fidelio

Reputation: 223

for example:

//routing.yml
test_root: 
    path: /css/fmain.css
    defaults:  { _controller: AcmeBlogBundle:Blog:index }
..

is valid. That means that the request of that root will call the indexAction of the Blog Controller in my exemple.

thought, are you trying just to include some css file?

is so check the doc: http://symfony.com/fr/doc/current/book/templating.html#liens-vers-des-fichiers

Upvotes: 0

Related Questions