开发者

How to add a custom "under maintenance" page?

I'm trying to add a custom page to开发者_运维百科 my web application for the times I'm performing maintenance.

I'm trying to test the referred page on my development environment but the Symfony page always appears. I had already created a module with a proper action and template and also configured those on the settings.yml file.


Have you tried this: "Website Temporarily Unavailable" error page


In your app's settings.yml set these:

all:
  .settings:
    module_disabled_module: security   # To be called when a user requests 
    module_disabled_action: disabled  # A module disabled in the module.yml

In the module's module.yml set this:

prod: 
  enabled:     false

This will disable the your module for prod environment, but it will still be available for dev and test environments.

Hope it helps. Regards, Radu.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜