开发者

How do I enable prod?

When I visit my Symfony2 project using app_dev.php, I see my site. When I visit it using app.php, I see the Symfony2 Welcome page that comes up for new projects.

I haven't put anything in my config_dev.yml or routing_dev.yml files. I've run php app/console cache:clear. Why can't I see my project outside of development mode?

Here is my routing.yml

_welcome:
    resource: "@FooBundle/Resources/config/routing.yml"

and my routing_dev.yml

_assetic:
    resource: .
    type:     assetic

_wdt:
    resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
    prefix:   /_wdt

_profiler:
    resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
    prefix:   /_profiler

_configurator:
    resource: "@SymfonyWebConfiguratorBundle/Resources/config/routing/configurator.xml"
    prefix:   /_config开发者_开发技巧urator

_main:
    resource: routing.yml

and FooBundle/Resources/config/routing.yml

homepage:
    pattern:  /
    defaults: { _controller: FooBundle:Default:index }

(other stuff...)


Try running this:

php app/console --env=prod cache:clear

Also you could try debugging routes with:

php app/console --env=prod router:debug


To which controller did routing.yml and routing_dev.yml route with the following pattern?
pattern: /

they should route to the same controller.

Please post your routing*.yml

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜